pub trait Serialize {
// Required methods
fn serialized_length(&self) -> usize;
fn write(&self, buf: &mut [u8]) -> usize;
fn read(buf: &[u8]) -> Result<(usize, Self), ()>
where Self: Sized;
// Provided method
fn has_end_optimization() -> bool
where Self: Sized { ... }
}
Expand description
frame serialization
Required Methods§
Sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
determine serialized length of frame
Provided Methods§
Sourcefn has_end_optimization() -> boolwhere
Self: Sized,
fn has_end_optimization() -> boolwhere
Self: Sized,
whether the frame has special “serialize to end” behavior