namespaces

This commit is contained in:
NikVolf
2017-04-03 13:58:49 +03:00
parent 8a48edb6c6
commit a5fdfa57cf
5 changed files with 25 additions and 20 deletions

View File

@ -19,7 +19,7 @@ pub use self::global_entry::GlobalEntry;
pub use self::primitives::{VarUint32, VarUint7, VarUint1, VarInt7, Uint32, Uint64, VarUint64, CountedList};
pub use self::types::{ValueType, BlockType};
pub use self::ops::{Opcode, Opcodes, InitExpr};
pub use self::func::{FuncBody, Local};
pub use self::func::{Func, FuncBody, Local};
pub use self::segment::{ElementSegment, DataSegment};
pub trait Deserialize : Sized {
@ -27,6 +27,11 @@ pub trait Deserialize : Sized {
fn deserialize<R: io::Read>(reader: &mut R) -> Result<Self, Self::Error>;
}
pub trait Serialize {
type Error;
fn serialize<W: io::Write>(&self, writer: &mut W) -> Result<(), Self::Error>;
}
#[derive(Debug)]
pub enum Error {
UnexpectedEof,