Make Ebml struct generic over source type

This commit is contained in:
Tangent 128 2017-04-16 16:24:15 -04:00
parent bc1569a461
commit efe708ca6b
1 changed files with 3 additions and 2 deletions

View File

@ -128,9 +128,10 @@ pub trait Schema<'a> {
}
pub struct Ebml<'b, S: Schema<'b>>(S, &'b[u8]);
#[derive(Debug, PartialEq)]
pub struct Ebml<'b, S: Schema<'b>, T: 'b>(S, &'b T);
impl<'b, S: Schema<'b>> IntoIterator for Ebml<'b, S> {
impl<'b, S: Schema<'b>> IntoIterator for Ebml<'b, S, &'b[u8]> {
type Item = S::Element;
type IntoIter = EbmlIterator<'b, S>;