From 79f9039c7e1194afb952e63ee4584b0853a47828 Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Tue, 16 Apr 2019 17:40:22 -0400 Subject: [PATCH] Not quite compiling, but getting better --- src/lib.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 73f5fc8..193098f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,4 @@ use std::io; -use std::io::Read; -use std::io::Seek; #[derive(Debug)] pub enum KaitaiError<'a> { @@ -21,9 +19,13 @@ pub trait KaitaiStruct<'a> type Parent: KaitaiStruct<'a>; type Root: KaitaiStruct<'a>; - fn new(stream: &mut S) -> Result + /// Create a new instance of this struct; if we are the root node, + /// then both `_parent` and `_root` will be `None`. + fn new(_parent: Option<&'a Self::Parent>, _root: Option<&'a Self::Root>) -> Result<'a, Self> where Self: Sized; + + //fn read(&mut self, stream: &S); } pub trait KaitaiStream {