Struct fastly::handle::config_store::ConfigStoreHandle
source · pub struct ConfigStoreHandle { /* private fields */ }
Expand description
A low-level interface to Config Store.
Methods here are typically exposed as the try_*
APIs on
crate::config_store::ConfigStore
and should not be needed directly.
Additionally, the get()
method allows the caller to configure the
size of the buffer used to receive lookup results from the host. The size of this buffer
is typically managed by APIs exposed in crate::config_store::ConfigStore
.
Implementations§
source§impl ConfigStoreHandle
impl ConfigStoreHandle
sourcepub fn open(name: &str) -> Result<Self, OpenError>
pub fn open(name: &str) -> Result<Self, OpenError>
Acquire a handle to an Config Store.
If a handle could not be acquired, an OpenError
will be returned.
sourcepub fn get(
&self,
key: &str,
max_len: usize
) -> Result<Option<String>, LookupError>
pub fn get( &self, key: &str, max_len: usize ) -> Result<Option<String>, LookupError>
Lookup a value in this config store.
If successful, this function returns Ok(Some(_))
if an entry was found, or Ok(None)
if
no entry with the given key was found. If the lookup failed, a LookupError
will be
returned.
sourcepub fn contains(&self, key: &str) -> Result<bool, LookupError>
pub fn contains(&self, key: &str) -> Result<bool, LookupError>
Return true if the config store contains an entry with the given key.
sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Return true if the crate::config_store::ConfigStore
handle is valid.
sourcepub fn is_invalid(&self) -> bool
pub fn is_invalid(&self) -> bool
Return true if the crate::config_store::ConfigStore
handle is invalid.
Trait Implementations§
source§impl Debug for ConfigStoreHandle
impl Debug for ConfigStoreHandle
source§impl Hash for ConfigStoreHandle
impl Hash for ConfigStoreHandle
source§impl PartialEq for ConfigStoreHandle
impl PartialEq for ConfigStoreHandle
source§fn eq(&self, other: &ConfigStoreHandle) -> bool
fn eq(&self, other: &ConfigStoreHandle) -> bool
self
and other
values to be equal, and is used
by ==
.