#[non_exhaustive]pub struct FailureContext {
pub key_name: String,
pub consecutive_failures: u32,
pub window_elapsed: Duration,
pub note: Cow<'static, str>,
}Expand description
Context passed when a decryption attempt fails — wrong key, tampered ciphertext, etc.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.key_name: StringLogical name of the key whose use produced the failure.
consecutive_failures: u32Number of consecutive failures observed for this key, including this one.
window_elapsed: DurationTime elapsed since the first failure in the current window.
note: Cow<'static, str>Caller-supplied free-form note. Sanitized — never includes key bytes or ciphertext.
Trait Implementations§
Source§impl Clone for FailureContext
impl Clone for FailureContext
Source§fn clone(&self) -> FailureContext
fn clone(&self) -> FailureContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FailureContext
impl RefUnwindSafe for FailureContext
impl Send for FailureContext
impl Sync for FailureContext
impl Unpin for FailureContext
impl UnsafeUnpin for FailureContext
impl UnwindSafe for FailureContext
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