SecretStoreHandle

Structin secret_storefastly 0.13.1View source
pub struct SecretStoreHandle { /* private fields */ }

A low-level interface to Secret Store.

Methods here are typically exposed as the try_* APIs on crate::secret_store::SecretStore and should not be needed directly.

Constants

INVALID

Selfread-onlyView source

An invalid secret store handle.

Methods

contains

View source
fn contains(&self, name: &str) -> Result<bool, LookupError>

Return true if the secret store contains a secret with the given name.

Parameters

self: &Self
name: &str

Returns

from_u32

View source
unsafe fn from_u32(handle: u32) -> Self

Make a handle from its underlying representation.

This should only be used when calling the raw ABI directly, and care should be taken not to reuse or alias handle values.

Parameters

handle: u32

Returns

Self
fn get(&self, secret_name: &str) -> Result<Option<SecretHandle>, LookupError>

Lookup a secret in this Secret Store, and return a handle to it.

If successful, this function returns Ok(Some(_)) if a secret was found, or Ok(None) if no secret with the given name was found. If the lookup failed, a LookupError will be returned.

Parameters

self: &Self
secret_name: &str

Returns

fn open(secret_store_name: &str) -> Result<Self, OpenError>

Acquire a handle to a Secret Store.

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

Parameters

secret_store_name: &str

Returns

Trait implementations

impl Debug for SecretStoreHandle

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Parameters

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

Returns

$crate::fmt::Result

impl Hash for SecretStoreHandle

fn hash<__H: Hasher>(&self, state: &mut __H)

Parameters

self: &Self
state: &mut __H

impl PartialEq for SecretStoreHandle

fn eq(&self, other: &Self) -> bool

Parameters

self: &Self
other: &Self

Returns

bool

Auto trait implementations

Blanket implementations