Trait nuts_backend::Binary
source · pub trait Binarywhere
Self: Sized,{
// Required methods
fn from_bytes(bytes: &[u8]) -> Option<Self>;
fn as_bytes(&self) -> Vec<u8>;
}
Expand description
Trait for binary conversion.
Self::as_bytes
is used to create a binary representation of this instance.- The
Self::from_bytes
method is used to convert the binary data back to its instance.
Required Methods§
sourcefn from_bytes(bytes: &[u8]) -> Option<Self>
fn from_bytes(bytes: &[u8]) -> Option<Self>
Object Safety§
This trait is not object safe.