pub trait Cacheable {
// Required methods
fn from_bytes(bytes: &[u8]) -> Option<Self>
where Self: Sized;
fn to_bytes(&self) -> Option<Vec<u8>>;
}
Expand description
Trait for objects that are cacheable.
pub trait Cacheable {
// Required methods
fn from_bytes(bytes: &[u8]) -> Option<Self>
where Self: Sized;
fn to_bytes(&self) -> Option<Vec<u8>>;
}
Trait for objects that are cacheable.