DictionaryHandle

Structin dictionaryfastly 0.13.1since 0.8.6View source
Deprecated: renamed to ConfigStoreHandle
pub struct DictionaryHandle { /* private fields */ }

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.

Constants

INVALID

Selfread-onlysince 0.8.6deprecatedView source
Deprecated: use the constant in ConfigStoreHandle instead

An invalid handle.

Methods

contains

deprecatedView source
Deprecated: use the method on ConfigStoreHandle instead
fn contains(&self, key: &str) -> Result<bool, LookupError>

Return true if the dictionary contains an entry with the given key.

Parameters

self: &Self
key: &str

Returns

get

deprecatedView source
Deprecated: use the method on ConfigStoreHandle instead
fn get(&self, key: &str, max_len: usize) -> Result<Option<String>, LookupError>

Lookup 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.

Parameters

self: &Self
key: &str
max_len: usize

Returns

is_invalid

deprecatedView source
Deprecated: use the method on ConfigStoreHandle instead
fn is_invalid(&self) -> bool

Return true if the request handle is invalid.

Parameters

self: &Self

Returns

bool

is_valid

deprecatedView source
Deprecated: use the method on ConfigStoreHandle instead
fn is_valid(&self) -> bool

Return true if the request handle is valid.

Parameters

self: &Self

Returns

bool

open

deprecatedView source
Deprecated: use the method on ConfigStoreHandle instead
fn open(name: &str) -> Result<Self, OpenError>

Acquire a handle to an Edge Dictionary.

If a handle could not be acquired, an OpenError will be returned.

Parameters

name: &str

Returns

Trait implementations

impl Debug for DictionaryHandle

fmt

deprecatedView source
Deprecated: renamed to handle::config_store
fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

self: &Self
f: &mut $crate::fmt::Formatter

Returns

$crate::fmt::Result

impl Hash for DictionaryHandle

hash

deprecatedView source
Deprecated: renamed to handle::config_store
fn hash<__H: Hasher>(&self, state: &mut __H)

Parameters

self: &Self
state: &mut __H

impl PartialEq for DictionaryHandle

eq

deprecatedView source
Deprecated: renamed to handle::config_store
fn eq(&self, other: &Self) -> bool

Parameters

self: &Self
other: &Self

Returns

bool

Auto trait implementations

Blanket implementations