diff --git a/hptp/src/msg.rs b/hptp/src/msg.rs index 1946b09..cf33e3b 100644 --- a/hptp/src/msg.rs +++ b/hptp/src/msg.rs @@ -21,9 +21,10 @@ pub enum DownMsg { pub struct DesError; pub trait SerDes: Sized { - // For both methods: `buf.len()` must be >= `MAX_SERIALIZED_SIZE` - + // `buf.len()` must be <= `MAX_TOTAL_PACKET_SIZE` fn des(buf: &[u8]) -> Result; + + // `buf.len()` must be >= `MAX_TOTAL_PACKET_SIZE` fn ser_to(&self, buf: &mut [u8]) -> usize; }