pub enum TrustDepth {
None,
Limited(u8),
Unlimited,
}Expand description
The “trust depth” of a Delegation.
See https://www.rfc-editor.org/rfc/rfc9580.html#name-trust-signature
Variants§
Implementations§
Source§impl TrustDepth
impl TrustDepth
Sourcepub fn minus(&self, n: u8) -> Option<TrustDepth>
pub fn minus(&self, n: u8) -> Option<TrustDepth>
Subtract n from this TrustDepth
Returns None if the subtraction underflows
Source§impl TrustDepth
impl TrustDepth
Sourcepub fn acceptable_path_len(&self, path_len: usize) -> bool
pub fn acceptable_path_len(&self, path_len: usize) -> bool
Check if the length of a path is acceptable relative to this TrustDepth.
For limited trust depth, path_len must be below the depth limit.
However, for TrustDepth::Unlimited any path length is acceptable.
Trait Implementations§
Source§impl Clone for TrustDepth
impl Clone for TrustDepth
Source§fn clone(&self) -> TrustDepth
fn clone(&self) -> TrustDepth
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 TrustDepth
impl Debug for TrustDepth
Source§impl From<TrustDepth> for u8
impl From<TrustDepth> for u8
Source§fn from(value: TrustDepth) -> Self
fn from(value: TrustDepth) -> Self
Converts to this type from the input type.
Source§impl From<u8> for TrustDepth
impl From<u8> for TrustDepth
Source§impl Hash for TrustDepth
impl Hash for TrustDepth
Source§impl Ord for TrustDepth
impl Ord for TrustDepth
Source§fn cmp(&self, other: &TrustDepth) -> Ordering
fn cmp(&self, other: &TrustDepth) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for TrustDepth
impl PartialEq for TrustDepth
Source§impl PartialOrd for TrustDepth
impl PartialOrd for TrustDepth
impl Copy for TrustDepth
impl Eq for TrustDepth
impl StructuralPartialEq for TrustDepth
Auto Trait Implementations§
impl Freeze for TrustDepth
impl RefUnwindSafe for TrustDepth
impl Send for TrustDepth
impl Sync for TrustDepth
impl Unpin for TrustDepth
impl UnwindSafe for TrustDepth
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