#[non_exhaustive]pub enum PasswordState {
Present,
Absent,
NotRead,
InKeychain,
}Expand description
Whether ProxyAuth::password has a value, and why not when it has none.
assert_eq!(ProxyAuth::new("alice", Some("hunter2")).password_state(), PasswordState::Present);
assert_eq!(ProxyAuth::from_username("alice").password_state(), PasswordState::Absent);Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Present
The source provided a password, and ProxyAuth::password returns it.
Absent
The source holds no password for this user: http://alice@proxy/, or a GNOME
authentication-password that is empty.
NotRead
The source may hold one, and this crate does not read it. GNOME’s
authentication-password: a plaintext secret in dconf that every reader of the
configuration would otherwise carry.
InKeychain
The password lives in the macOS keychain, which this crate does not open. System Configuration carries the user name only.
Trait Implementations§
Source§impl Clone for PasswordState
impl Clone for PasswordState
impl Copy for PasswordState
Source§impl Debug for PasswordState
impl Debug for PasswordState
impl Eq for PasswordState
Source§impl Hash for PasswordState
impl Hash for PasswordState
Source§impl PartialEq for PasswordState
impl PartialEq for PasswordState
impl StructuralPartialEq for PasswordState
Auto Trait Implementations§
impl Freeze for PasswordState
impl RefUnwindSafe for PasswordState
impl Send for PasswordState
impl Sync for PasswordState
impl Unpin for PasswordState
impl UnsafeUnpin for PasswordState
impl UnwindSafe for PasswordState
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