Struct fastly::handle::dictionary::DictionaryHandle
source · pub struct DictionaryHandle { /* private fields */ }
ConfigStoreHandle
Expand description
A low-level interface to Edge Dictionaries.
Unlike the high-level Dictionary
, this type has methods
that return Result
values upon failure, rather than panicking. Additionally, the
get()
method allows the caller to configure the size of the buffer used to
received lookup results from the host.
Implementations§
source§impl DictionaryHandle
impl DictionaryHandle
sourcepub const INVALID: Self = _
👎Deprecated since 0.8.6: use the constant in ConfigStoreHandle
instead
pub const INVALID: Self = _
ConfigStoreHandle
insteadAn invalid handle.
sourcepub fn open(name: &str) -> Result<Self, OpenError>
👎Deprecated since 0.8.6: use the method on ConfigStoreHandle
instead
pub fn open(name: &str) -> Result<Self, OpenError>
ConfigStoreHandle
insteadAcquire a handle to an Edge Dictionary.
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>
👎Deprecated since 0.8.6: use the method on ConfigStoreHandle
instead
pub fn get( &self, key: &str, max_len: usize ) -> Result<Option<String>, LookupError>
ConfigStoreHandle
insteadLookup a value in this dictionary.
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>
👎Deprecated since 0.8.6: use the method on ConfigStoreHandle
instead
pub fn contains(&self, key: &str) -> Result<bool, LookupError>
ConfigStoreHandle
insteadReturn true if the dictionary contains an entry with the given key.
sourcepub fn is_valid(&self) -> bool
👎Deprecated since 0.8.6: use the method on ConfigStoreHandle
instead
pub fn is_valid(&self) -> bool
ConfigStoreHandle
insteadReturn true if the request handle is valid.
sourcepub fn is_invalid(&self) -> bool
👎Deprecated since 0.8.6: use the method on ConfigStoreHandle
instead
pub fn is_invalid(&self) -> bool
ConfigStoreHandle
insteadReturn true if the request handle is invalid.
Trait Implementations§
source§impl Debug for DictionaryHandle
impl Debug for DictionaryHandle
source§impl Hash for DictionaryHandle
impl Hash for DictionaryHandle
source§impl PartialEq for DictionaryHandle
impl PartialEq for DictionaryHandle
source§fn eq(&self, other: &DictionaryHandle) -> bool
fn eq(&self, other: &DictionaryHandle) -> bool
self
and other
values to be equal, and is used
by ==
.