#[non_exhaustive]pub enum DanePolicy {
Disabled,
ValidateIfPresent,
Required,
}Expand description
DANE verification policy.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Disabled
Never check TLSA records (skip DANE verification entirely).
ValidateIfPresent
Validate TLSA records if present; skip if not found. This is a permissive mode that adds security when available.
Required
Require TLSA records to exist and validate. Connections are rejected if TLSA records are missing or don’t match.
Implementations§
Source§impl DanePolicy
impl DanePolicy
Sourcepub fn should_verify(&self) -> bool
pub fn should_verify(&self) -> bool
Check if DANE verification should be performed.
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Check if TLSA records are required.
Trait Implementations§
Source§impl Clone for DanePolicy
impl Clone for DanePolicy
Source§fn clone(&self) -> DanePolicy
fn clone(&self) -> DanePolicy
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 DanePolicy
impl Debug for DanePolicy
Source§impl Default for DanePolicy
impl Default for DanePolicy
Source§fn default() -> DanePolicy
fn default() -> DanePolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for DanePolicy
impl PartialEq for DanePolicy
impl Copy for DanePolicy
impl Eq for DanePolicy
impl StructuralPartialEq for DanePolicy
Auto Trait Implementations§
impl Freeze for DanePolicy
impl RefUnwindSafe for DanePolicy
impl Send for DanePolicy
impl Sync for DanePolicy
impl Unpin for DanePolicy
impl UnsafeUnpin for DanePolicy
impl UnwindSafe for DanePolicy
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.