Trait little::bytecode::Serializer
[−]
[src]
pub trait Serializer {
fn serialize<O: Write>(&self, writer: &mut O) -> Result<u64, Error>;
fn deserialize<I: Read>(reader: &mut I) -> Result<(u64, Self), Error> where Self: Sized;
}
Serialize and deserialize a structure from io
.
Required Methods
fn serialize<O: Write>(&self, writer: &mut O) -> Result<u64, Error>
Write contents to io writer
, returns bytes written.
fn deserialize<I: Read>(reader: &mut I) -> Result<(u64, Self), Error> where Self: Sized
Read contents from reader
, return tuple of bytes read and new structure.
Implementors
impl Serializer for Header