pub enum DataStore {
Redis,
Memcache,
Noxu,
}Expand description
Datastore family selected by data_store:.
§Examples
use dynomite::conf::DataStore;
assert_eq!(DataStore::from_int(0).unwrap(), DataStore::Redis);
assert_eq!(DataStore::Redis.as_int(), 0);
assert_eq!(DataStore::from_name("noxu").unwrap(), DataStore::Noxu);Variants§
Redis
Redis (RESP) datastore. Encoded as 0 in YAML.
Memcache
Memcached ASCII datastore. Encoded as 1 in YAML.
Noxu
In-process Noxu DB datastore (Riak-shaped). Encoded as
2 in YAML, or as the string noxu. Selecting this
variant requires dynomited to be built with
--features riak and a sibling noxu_path: knob.
Implementations§
Source§impl DataStore
impl DataStore
Sourcepub fn from_int(v: i64) -> Result<Self, ConfError>
pub fn from_int(v: i64) -> Result<Self, ConfError>
Parse a data_store: value as it appears in YAML.
§Examples
use dynomite::conf::DataStore;
assert_eq!(DataStore::from_int(1).unwrap(), DataStore::Memcache);
assert_eq!(DataStore::from_int(2).unwrap(), DataStore::Noxu);
assert!(DataStore::from_int(7).is_err());Sourcepub fn from_name(s: &str) -> Result<Self, ConfError>
pub fn from_name(s: &str) -> Result<Self, ConfError>
Parse the textual form of a data_store: value, as
accepted in YAML alongside the integer form.
Comparison is case-insensitive against redis,
memcache, memcached, and noxu.
§Examples
use dynomite::conf::DataStore;
assert_eq!(DataStore::from_name("REDIS").unwrap(), DataStore::Redis);
assert!(DataStore::from_name("sql").is_err());Trait Implementations§
impl Copy for DataStore
impl Eq for DataStore
impl StructuralPartialEq for DataStore
Auto Trait Implementations§
impl Freeze for DataStore
impl RefUnwindSafe for DataStore
impl Send for DataStore
impl Sync for DataStore
impl Unpin for DataStore
impl UnsafeUnpin for DataStore
impl UnwindSafe for DataStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.