Trait netidx_core::pack::Pack
source · pub trait Pack {
// Required methods
fn encoded_len(&self) -> usize;
fn encode(&self, buf: &mut impl BufMut) -> Result<(), PackError>;
fn decode(buf: &mut impl Buf) -> Result<Self, PackError>
where Self: Sized;
// Provided methods
fn const_encoded_len() -> Option<usize> { ... }
fn decode_into(&mut self, buf: &mut impl Buf) -> Result<(), PackError>
where Self: Sized { ... }
}
Required Methods§
fn encoded_len(&self) -> usize
fn encode(&self, buf: &mut impl BufMut) -> Result<(), PackError>
fn decode(buf: &mut impl Buf) -> Result<Self, PackError>where
Self: Sized,
Provided Methods§
fn const_encoded_len() -> Option<usize>
fn decode_into(&mut self, buf: &mut impl Buf) -> Result<(), PackError>where
Self: Sized,
Object Safety§
This trait is not object safe.