ooop
This commit is contained in:
parent
4fb26866c2
commit
038fd9037a
|
@ -21,9 +21,10 @@ pub enum DownMsg {
|
||||||
pub struct DesError;
|
pub struct DesError;
|
||||||
|
|
||||||
pub trait SerDes: Sized {
|
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>;
|
fn des(buf: &[u8]) -> Result<Self, DesError>;
|
||||||
|
|
||||||
|
// `buf.len()` must be >= `MAX_TOTAL_PACKET_SIZE`
|
||||||
fn ser_to(&self, buf: &mut [u8]) -> usize;
|
fn ser_to(&self, buf: &mut [u8]) -> usize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue