Trait librashader_cache::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§