pub struct Profile { /* private fields */ }

Implementations

Loads and returns a profile used to configure a CipherStash client.

This function respects the behaviour documented in the CipherStash configuration docs. Configuration parameters may be defined in any location (i.e. a JSON configuration file, environment variables, or an argument to this function call). Configuration at any specific level is not required (e.g. a JSON configuration file is not required) as long as the minimum amount of configuration can be resolved across all levels.

load optionally accepts a profile_name and config_path for specifying where to look for configuration files. Note that config_path is the root of all CipherStash config and that the path for profile-config.json files is resolved as <config_path>/<profile_name>/profile-config.json. If not provided, profile_name defaults to "default" and config_path defaults to ~/.cipherstash. If profile_name is provided and profile-config.json does not exist for the profile, load will fail and return an error.

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The error type produced by a failed conversion.

Convert the given value into an approximately equivalent representation.

The error type produced by a failed conversion.

Convert the subject into an approximately equivalent representation.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Approximate the subject with the default scheme.

Approximate the subject with a specific scheme.

Approximate the subject to a given type with the default scheme.

Approximate the subject to a given type with a specific scheme.

Convert the subject to a given type.

Attempt to convert the subject to a given type.

Attempt a value conversion of the subject to a given type.

Returns the argument unchanged.

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

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

Calls U::from(self).

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

Should always be Self

The error type produced by a failed conversion.

Convert the given value into the subject type.

The type returned in the event of a conversion error.

Performs the conversion.

The error type produced by a failed conversion.

Convert the subject into the destination type.

The type returned in the event of a conversion error.

Performs the conversion.

The error type produced by a failed conversion.

Convert the given value into an exactly equivalent representation.

The error type produced by a failed conversion.

Convert the subject into an exactly equivalent representation.

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

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