[−][src]Trait db::cache_structures::Cachable
trait to all structures that are cachable to cache server
Required methods
fn dump(&mut self) -> RedisResult<()>
construct hmap of current object that inherits this trait
fn load(self) -> RedisResult<Self> where
Self: Sized,
Self: Sized,
decontructs data from caching server and updates internal fields must not lose track of UID
fn destruct(self) -> RedisResult<()>
Permentatly removes all data associated to this object from redis server
fn uid(&self) -> UID
retrieve UID for object
fn name(&self) -> &str
retrieve name of object
Provided methods
fn make_key<'a>(&self, field_name: &'a str) -> String
create key from struct name, uid, and custom identifier
fn create_tag<'a, T: ToRedisArgs + ToString>(
&self,
field_name: &'a str,
field_value: &'a T
) -> (String, String)
&self,
field_name: &'a str,
field_value: &'a T
) -> (String, String)
Create tag for redis consumption in the format of
(Name:uid:field, value)