pub struct IdentityBindingCache { /* private fields */ }Expand description
Cache of the first observed identity binding per GuidPrefix.
Implementations§
Source§impl IdentityBindingCache
impl IdentityBindingCache
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Cache with an explicit cap (DoS protection). On reaching it,
Self::observe returns CapacityExhausted and the caller must
evict or reject.
Sourcepub fn observe(
&mut self,
guid_prefix: GuidPrefixBytes,
identity_token_bytes: &[u8],
) -> BindingDecision
pub fn observe( &mut self, guid_prefix: GuidPrefixBytes, identity_token_bytes: &[u8], ) -> BindingDecision
Observes a GuidPrefix-to-IdentityToken binding.
identity_token_bytes is the raw CDR DataHolder blob from
the PID_IDENTITY_TOKEN value (see C3.5).
Sourcepub fn evict(&mut self, guid_prefix: &GuidPrefixBytes) -> bool
pub fn evict(&mut self, guid_prefix: &GuidPrefixBytes) -> bool
Removes a binding — e.g. when a peer was evicted after a lease timeout or OCSP revoke. Allows the peer to re-discover with a new identity.
Sourcepub fn fingerprint_for(&self, guid_prefix: &GuidPrefixBytes) -> Option<&[u8]>
pub fn fingerprint_for(&self, guid_prefix: &GuidPrefixBytes) -> Option<&[u8]>
Reads the current fingerprint for a GuidPrefix (for audit/ logging).
Trait Implementations§
Source§impl Debug for IdentityBindingCache
impl Debug for IdentityBindingCache
Source§impl Default for IdentityBindingCache
impl Default for IdentityBindingCache
Source§fn default() -> IdentityBindingCache
fn default() -> IdentityBindingCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for IdentityBindingCache
impl RefUnwindSafe for IdentityBindingCache
impl Send for IdentityBindingCache
impl Sync for IdentityBindingCache
impl Unpin for IdentityBindingCache
impl UnsafeUnpin for IdentityBindingCache
impl UnwindSafe for IdentityBindingCache
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