pub struct SecurityKeyPins { /* private fields */ }Expand description
Proven PINs by key path, plus the one trial in flight.
Implementations§
Source§impl SecurityKeyPins
impl SecurityKeyPins
Sourcepub fn start_trial(&mut self, trial: PinTrial)
pub fn start_trial(&mut self, trial: PinTrial)
Put a freshly typed PIN on trial. It replaces any earlier trial.
pub fn trial(&self) -> Option<&PinTrial>
Sourcepub fn confirmed_pin(&self, key_path: &str) -> Option<&str>
pub fn confirmed_pin(&self, key_path: &str) -> Option<&str>
The proven PIN for key_path, if there is one.
Sourcepub fn drop_trial(&mut self, flow: PinFlow, alias: Option<&str>) -> bool
pub fn drop_trial(&mut self, flow: PinFlow, alias: Option<&str>) -> bool
Drop the trial of flow, only on alias when one is given. Returns
true when one went.
Sourcepub fn prune_aliases(&mut self, valid: &HashSet<&str>) -> bool
pub fn prune_aliases(&mut self, valid: &HashSet<&str>) -> bool
Drop a trial whose host left the config. Returns true when one went.
Trait Implementations§
Source§impl Debug for SecurityKeyPins
impl Debug for SecurityKeyPins
Auto Trait Implementations§
impl Freeze for SecurityKeyPins
impl RefUnwindSafe for SecurityKeyPins
impl Send for SecurityKeyPins
impl Sync for SecurityKeyPins
impl Unpin for SecurityKeyPins
impl UnsafeUnpin for SecurityKeyPins
impl UnwindSafe for SecurityKeyPins
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
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