Trait Cacheable

Source
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.

Required Methods§

Source

fn from_bytes(bytes: &[u8]) -> Option<Self>
where Self: Sized,

Source

fn to_bytes(&self) -> Option<Vec<u8>>

Implementations on Foreign Types§

Source§

impl Cacheable for Option<Vec<u8>>

Source§

fn from_bytes(bytes: &[u8]) -> Option<Self>

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Source§

impl Cacheable for Vec<u8>

Source§

fn from_bytes(bytes: &[u8]) -> Option<Self>

Source§

fn to_bytes(&self) -> Option<Vec<u8>>

Implementors§