Trait radn::mode::Serializer
source · pub trait Serializer {
// Required methods
fn write(&mut self, buf: &[u8]);
fn tell(&self) -> usize;
}Expand description
Serialisation mechanism that is chosen over bytestring concatenation both for performance and simplicity.
See Serializable.
Required Methods§
sourcefn write(&mut self, buf: &[u8])
fn write(&mut self, buf: &[u8])
Writes bytes from a slice. Should advance value of Serializer::tell() by buf.len.
sourcefn tell(&self) -> usize
fn tell(&self) -> usize
Current position of the stream. Used by CheckedSerialize.