pub struct TrustAnchors { /* private fields */ }
Available on crate features
dnssec-aws-lc-rs
or dnssec-ring
only.Expand description
The root set of trust anchors for validating DNSSEC, anything in this set will be trusted
Implementations§
Source§impl TrustAnchors
impl TrustAnchors
Sourcepub fn from_file(path: &Path) -> Result<Self, ParseError>
Available on crate feature text-parsing
only.
pub fn from_file(path: &Path) -> Result<Self, ParseError>
text-parsing
only.loads a trust anchor from a file of DNSKEY records
Sourcepub fn empty() -> Self
pub fn empty() -> Self
Creates a new empty trust anchor set
If you want to use the default root anchors, use TrustAnchor::default()
.
Sourcepub fn contains<P: PublicKey + ?Sized>(&self, other_key: &P) -> bool
pub fn contains<P: PublicKey + ?Sized>(&self, other_key: &P) -> bool
determines if the key is in the trust anchor set
Sourcepub fn insert<P: PublicKey + ?Sized>(&mut self, public_key: &P) -> bool
pub fn insert<P: PublicKey + ?Sized>(&mut self, public_key: &P) -> bool
inserts the trust_anchor to the trusted chain
Sourcepub fn get(&self, idx: usize) -> Option<&PublicKeyBuf>
pub fn get(&self, idx: usize) -> Option<&PublicKeyBuf>
get the trust anchor at the specified index
Trait Implementations§
Source§impl Clone for TrustAnchors
impl Clone for TrustAnchors
Source§fn clone(&self) -> TrustAnchors
fn clone(&self) -> TrustAnchors
Returns a copy 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 Default for TrustAnchors
impl Default for TrustAnchors
Auto Trait Implementations§
impl Freeze for TrustAnchors
impl RefUnwindSafe for TrustAnchors
impl Send for TrustAnchors
impl Sync for TrustAnchors
impl Unpin for TrustAnchors
impl UnwindSafe for TrustAnchors
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