Trait rust_cache::common::Cacheable [] [src]

pub trait Cacheable: Sized {
    type Error: Any;
    fn to_cache(&self) -> Result<String, Self::Error>;
    fn from_cache(string: &String) -> Result<Self, Self::Error>;
}

Trait for items that want to be cacheable allows for special to string method for when they get cached all items already able to be converted to a from a string have their default impl

Associated Types

type Error: Any

Required Methods

fn to_cache(&self) -> Result<String, Self::Error>

fn from_cache(string: &String) -> Result<Self, Self::Error>

Implementors