pub struct NonceObservation {
pub vendor: VendorId,
pub challenge_class: ChallengeClass,
pub observation_count: u32,
}Expand description
One observation row in the NonceBook.
The row records the vendor family and challenge class the
observation was tagged with (so a stale nonce re-entry from
a different vendor still surfaces the right audit context),
along with the observation count for monotonic accounting.
The TTL is owned by the LruTtlStore
backing the NonceBook.
§Example
use stygian_charon::token_lifecycle::{ChallengeClass, NonceObservation};
use stygian_charon::vendor_classifier::VendorId;
let obs = NonceObservation {
vendor: VendorId::Akamai,
challenge_class: ChallengeClass::ProofOfWork,
observation_count: 1,
};
assert_eq!(obs.vendor, VendorId::Akamai);Fields§
§vendor: VendorIdVendor family the observation was tagged with.
challenge_class: ChallengeClassChallenge class the observation was tagged with.
observation_count: u32Number of times the nonce has been observed (saturating on overflow).
Trait Implementations§
Source§impl Clone for NonceObservation
impl Clone for NonceObservation
Source§fn clone(&self) -> NonceObservation
fn clone(&self) -> NonceObservation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NonceObservation
impl Debug for NonceObservation
Source§impl<'de> Deserialize<'de> for NonceObservation
impl<'de> Deserialize<'de> for NonceObservation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for NonceObservation
impl PartialEq for NonceObservation
Source§impl Serialize for NonceObservation
impl Serialize for NonceObservation
impl Eq for NonceObservation
impl StructuralPartialEq for NonceObservation
Auto Trait Implementations§
impl Freeze for NonceObservation
impl RefUnwindSafe for NonceObservation
impl Send for NonceObservation
impl Sync for NonceObservation
impl Unpin for NonceObservation
impl UnsafeUnpin for NonceObservation
impl UnwindSafe for NonceObservation
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.