Make Ebml struct generic over source type
This commit is contained in:
parent
bc1569a461
commit
efe708ca6b
1 changed files with 3 additions and 2 deletions
|
@ -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>;
|
||||
|
||||
|
|
Loading…
Reference in a new issue