mirror of
https://github.com/bspeice/kaitai_rust
synced 2024-11-21 21:38:09 -05:00
Not quite compiling, but getting better
This commit is contained in:
parent
af5bd80034
commit
79f9039c7e
@ -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<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
|
||||
Self: Sized;
|
||||
|
||||
//fn read<S: KaitaiStream>(&mut self, stream: &S);
|
||||
}
|
||||
|
||||
pub trait KaitaiStream {
|
||||
|
Loading…
Reference in New Issue
Block a user