Struct CipherStashSecretConfigFileBuilder
pub struct CipherStashSecretConfigFileBuilder { /* private fields */ }Expand description
Builder (with a terribly long, Java like name) for the cipherstash.secret.toml configuration file (used by stash CLI).
Implementations§
§impl CipherStashSecretConfigFileBuilder
impl CipherStashSecretConfigFileBuilder
pub fn new() -> Self
pub fn new() -> Self
Create a new builder.
pub fn with_client_key(self, client_key: ClientKey) -> Self
pub fn with_client_key(self, client_key: ClientKey) -> Self
Set the client key.
pub fn with_access_key(self, access_key: String) -> Self
pub fn with_access_key(self, access_key: String) -> Self
Set the access key.
pub fn with_meta_opt<S: Into<String>>(self, meta: Option<S>) -> Self
pub fn with_meta_opt<S: Into<String>>(self, meta: Option<S>) -> Self
Adds a comment to the top of the configuration file.
Like Self::with_meta, but accepts an Option.
If None is passed, no comment will be added.
pub fn with_meta(self, meta: impl Into<String>) -> Self
pub fn with_meta(self, meta: impl Into<String>) -> Self
Adds a comment to the top of the configuration file.
pub fn try_build(self) -> Result<CipherStashSecretConfigFile, ConfigError>
pub fn try_build(self) -> Result<CipherStashSecretConfigFile, ConfigError>
Attempt to build the CipherStashSecretConfigFile.
It will error if the client key is missing or invalid.
NOTE: This method does not currently validate the access key.
Trait Implementations§
§impl Default for CipherStashSecretConfigFileBuilder
impl Default for CipherStashSecretConfigFileBuilder
§fn default() -> CipherStashSecretConfigFileBuilder
fn default() -> CipherStashSecretConfigFileBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CipherStashSecretConfigFileBuilder
impl RefUnwindSafe for CipherStashSecretConfigFileBuilder
impl Send for CipherStashSecretConfigFileBuilder
impl Sync for CipherStashSecretConfigFileBuilder
impl Unpin for CipherStashSecretConfigFileBuilder
impl UnsafeUnpin for CipherStashSecretConfigFileBuilder
impl UnwindSafe for CipherStashSecretConfigFileBuilder
Blanket Implementations§
impl<T> AuthStrategyBounds for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more