compilation fixed
This commit is contained in:
@@ -16,10 +16,12 @@
|
||||
|
||||
//! Binary representation of types
|
||||
|
||||
pub trait BinaryConvertable {
|
||||
fn size(&self) -> usize;
|
||||
pub struct BinaryConvertError;
|
||||
|
||||
fn to_bytes(buffer: &mut [u8]);
|
||||
pub trait BinaryConvertable : Sized {
|
||||
fn size(&self) -> Result<usize, BinaryConvertError>;
|
||||
|
||||
fn from_bytes(buffer: &[u8]) -> Self;
|
||||
fn to_bytes(buffer: &mut [u8]) -> Result<(), BinaryConvertError>;
|
||||
|
||||
fn from_bytes(buffer: &[u8]) -> Result<Self, BinaryConvertError>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user