pub struct ExactAlgorithmPolicy { /* private fields */ }Expand description
Single-algorithm admission policy for high-assurance verification contexts.
This avoids sender-choice downgrade behavior entirely: exactly one algorithm is admitted for the operation class.
Implementations§
Source§impl ExactAlgorithmPolicy
impl ExactAlgorithmPolicy
Sourcepub const fn new(admitted: SignatureAlgorithm) -> Self
pub const fn new(admitted: SignatureAlgorithm) -> Self
Creates a policy that admits exactly one signature algorithm.
Sourcepub const fn algorithm(self) -> SignatureAlgorithm
pub const fn algorithm(self) -> SignatureAlgorithm
Returns the only admitted algorithm.
Sourcepub const fn admits(self, algorithm: SignatureAlgorithm) -> bool
pub const fn admits(self, algorithm: SignatureAlgorithm) -> bool
Returns true when the algorithm is the exact admitted algorithm.
Trait Implementations§
Source§impl Clone for ExactAlgorithmPolicy
impl Clone for ExactAlgorithmPolicy
Source§fn clone(&self) -> ExactAlgorithmPolicy
fn clone(&self) -> ExactAlgorithmPolicy
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 moreimpl Copy for ExactAlgorithmPolicy
Source§impl Debug for ExactAlgorithmPolicy
impl Debug for ExactAlgorithmPolicy
impl Eq for ExactAlgorithmPolicy
Source§impl PartialEq for ExactAlgorithmPolicy
impl PartialEq for ExactAlgorithmPolicy
Source§fn eq(&self, other: &ExactAlgorithmPolicy) -> bool
fn eq(&self, other: &ExactAlgorithmPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ExactAlgorithmPolicy
Auto Trait Implementations§
impl Freeze for ExactAlgorithmPolicy
impl RefUnwindSafe for ExactAlgorithmPolicy
impl Send for ExactAlgorithmPolicy
impl Sync for ExactAlgorithmPolicy
impl Unpin for ExactAlgorithmPolicy
impl UnsafeUnpin for ExactAlgorithmPolicy
impl UnwindSafe for ExactAlgorithmPolicy
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