Skip to main content

SystemSecrets

Struct SystemSecrets 

Source
pub struct SystemSecrets { /* private fields */ }
Expand description

Reads and keeps secrets in the host’s own secret store.

Implementations§

Source§

impl SystemSecrets

Source

pub fn new(config: SystemConfig) -> Result<Self, String>

A provider over the platform’s own store.

§Errors

A message for an empty service or a zero timeout_secs, or for a platform with no store the provider knows.

Source

pub fn with_store(service: &str, store: Arc<dyn Store>) -> Result<Self, String>

A provider over store, for a test or a host with a store of its own.

§Errors

A message for an empty service.

Trait Implementations§

Source§

impl Debug for SystemSecrets

Source§

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

Formats the value using the given formatter. Read more
Source§

impl ProviderDecl for SystemSecrets

Source§

const KINDS: &'static [&'static str]

The name of every kind this provider serves, so a library can declare them at compile time.
Source§

fn provider(host: Host, alloc: Alloc) -> Result<ProviderParts, ValueError>

Builds this provider’s descriptor, its tables and its configuration schema, once. host is what the library was loaded by; alloc is what the schema is built through.
Source§

impl SecretProvider for SystemSecrets

Source§

fn read(&self, ask: &Value) -> Result<Value, ProviderError>

Reads ask (a SecretAsk as a value) and answers a SecretRead. An error’s text never holds a value: AI6 withholds it from people anyway.
Source§

fn read_in(&self, ask: &Value, alloc: Alloc) -> Result<Value, ProviderError>

read, its answer built through alloc. Read more
Source§

fn fields(&self) -> Result<Value, ProviderError>

The JSON Schema, as a value, of the fields one secret names besides key. A field may not take a name in RESERVED_FIELDS. The default declares none.
Source§

fn store(&self, request: &Value) -> Result<Value, ProviderError>

Keeps request (a SecretStore as a value) and answers a SecretStored.
Source§

fn lease(&self, ask: &Value) -> Result<Value, ProviderError>

Leases ask (a SecretLeaseAsk as a value) and answers a SecretLeased. A provider that does not lease leaves the default, and is read instead.
Source§

fn revoke(&self, lease: &str) -> Result<(), ProviderError>

Revokes the lease lease; one already gone is not an error.
Source§

fn fields_in(&self, alloc: Alloc) -> Result<Value, ProviderError>

fields, its answer built through alloc. Read more
Source§

fn lease_in(&self, ask: &Value, alloc: Alloc) -> Result<Value, ProviderError>

lease, its answer built through alloc. Read more
Source§

fn store_in( &self, request: &Value, alloc: Alloc, ) -> Result<Value, ProviderError>

store, its answer built through alloc. Read more
Source§

impl TryFrom<SystemConfig> for SystemSecrets

Source§

type Error = ProviderError

The type returned in the event of a conversion error.
Source§

fn try_from(config: SystemConfig) -> Result<Self, Self::Error>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoMaybeUndefined<T> for T

§

fn into_maybe_undefined(self) -> MaybeUndefined<T>

Converts this value into a three-state builder argument.
§

impl<T> IntoOption<T> for T

§

fn into_option(self) -> Option<T>

Converts this value into an optional builder argument.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more