Not quite compiling, but getting better

This commit is contained in:
Bradlee Speice 2019-04-16 17:40:22 -04:00
parent af5bd80034
commit 79f9039c7e

View File

@ -1,6 +1,4 @@
use std::io; use std::io;
use std::io::Read;
use std::io::Seek;
#[derive(Debug)] #[derive(Debug)]
pub enum KaitaiError<'a> { pub enum KaitaiError<'a> {
@ -21,9 +19,13 @@ pub trait KaitaiStruct<'a>
type Parent: KaitaiStruct<'a>; type Parent: KaitaiStruct<'a>;
type Root: KaitaiStruct<'a>; type Root: KaitaiStruct<'a>;
fn new<S: KaitaiStream>(stream: &mut S) -> Result<Self> /// 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 where
Self: Sized; Self: Sized;
//fn read<S: KaitaiStream>(&mut self, stream: &S);
} }
pub trait KaitaiStream { pub trait KaitaiStream {