pub enum PasswordOrigin {
Env(&'static str),
File(PathBuf),
Prompt,
}Expand description
Which PasswordSource supplied the password that read_password
returned. Lets a caller name the winning source in its own messages —
key-gen uses it to refuse an empty password that came from the
environment (a shell expanding an unset variable), and operator commands
use it to say which source won.
Variants§
Env(&'static str)
The environment variable named here supplied the password.
File(PathBuf)
This file supplied the password.
Prompt
An interactive terminal prompt supplied the password.
Implementations§
Trait Implementations§
Source§impl Clone for PasswordOrigin
impl Clone for PasswordOrigin
Source§impl Debug for PasswordOrigin
impl Debug for PasswordOrigin
impl Eq for PasswordOrigin
Source§impl PartialEq for PasswordOrigin
impl PartialEq for PasswordOrigin
impl StructuralPartialEq for PasswordOrigin
Auto Trait Implementations§
impl Freeze for PasswordOrigin
impl RefUnwindSafe for PasswordOrigin
impl Send for PasswordOrigin
impl Sync for PasswordOrigin
impl Unpin for PasswordOrigin
impl UnsafeUnpin for PasswordOrigin
impl UnwindSafe for PasswordOrigin
Blanket Implementations§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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