pub struct CacheServiceConfig(/* private fields */);Expand description
Parsed cache-service configuration: a map from namespace name to its configuration block. Unknown YAML fields are ignored.
Implementations§
Source§impl CacheServiceConfig
impl CacheServiceConfig
Sourcepub fn from_yaml_str(yaml: &str) -> Result<Self, CacheServiceError>
pub fn from_yaml_str(yaml: &str) -> Result<Self, CacheServiceError>
Parse native cache configuration without legacy format conversions.
Sourcepub fn masters_of(&self, namespace: &str) -> Option<&[String]>
pub fn masters_of(&self, namespace: &str) -> Option<&[String]>
Returns the master list for the given namespace, if present.
Sourcepub fn namespace(&self, namespace: &str) -> Option<&CacheNamespaceConf>
pub fn namespace(&self, namespace: &str) -> Option<&CacheNamespaceConf>
Returns the configuration block for the given namespace, if present.
Trait Implementations§
Source§impl Clone for CacheServiceConfig
impl Clone for CacheServiceConfig
Source§impl Debug for CacheServiceConfig
impl Debug for CacheServiceConfig
Source§impl<'de> Deserialize<'de> for CacheServiceConfig
impl<'de> Deserialize<'de> for CacheServiceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CacheServiceConfig
impl RefUnwindSafe for CacheServiceConfig
impl Send for CacheServiceConfig
impl Sync for CacheServiceConfig
impl Unpin for CacheServiceConfig
impl UnsafeUnpin for CacheServiceConfig
impl UnwindSafe for CacheServiceConfig
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