pub trait AsRawMsg {
// Required methods
fn get_hdr(&self) -> (u8, u32, u32);
fn get_bytes<W: Write>(&self, w: &mut W) -> Result<()>;
fn from_raw_msg(msg: RawMsg<'_>) -> Result<Self>
where Self: Sized;
// Provided methods
fn get_u32s<W: Write>(&self, _: &mut W) -> Result<()> { ... }
fn get_u64s<W: Write>(&self, _: &mut W) -> Result<()> { ... }
}
Expand description
Types that can be serialized.