This commit is contained in:
Milo Turner 2020-03-11 13:51:29 -04:00
parent 4fb26866c2
commit 038fd9037a
1 changed files with 3 additions and 2 deletions

View File

@ -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<Self, DesError>;
// `buf.len()` must be >= `MAX_TOTAL_PACKET_SIZE`
fn ser_to(&self, buf: &mut [u8]) -> usize;
}