Struct TrustAnchor
pub struct TrustAnchor<'a> { pub subject: Der<'a>, pub subject_public_key_info: Der<'a>, pub name_constraints: Option<Der<'a>> }
A trust anchor (a.k.a. root CA)
Traditionally, certificate verification libraries have represented trust anchors as full X.509
root certificates. However, those certificates contain a lot more data than is needed for
verifying certificates. The TrustAnchor representation allows an application to store
just the essential elements of trust anchors.
The most common way to get one of these is to call rustls_webpki::anchor_from_trusted_cert().
Fields
subject: Der<'a>Value of the
subjectfield of the trust anchorsubject_public_key_info: Der<'a>Value of the
subjectPublicKeyInfofield of the trust anchorname_constraints: Option<Der<'a>>Value of DER-encoded
NameConstraints, containing name constraints to the trust anchor, if any
Implementations
impl TrustAnchor<'_>
fn to_owned(&self) -> TrustAnchor<'static>Yield a
'staticlifetime of theTrustAnchorby allocating ownedDervariants
Trait Implementations
impl<'a> Clone for TrustAnchor<'a>
fn clone(&self) -> TrustAnchor<'a>
impl<'a> Debug for TrustAnchor<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Eq for TrustAnchor<'a>
impl<'a> Hash for TrustAnchor<'a>
fn hash<__H: Hasher>(&self, state: &mut __H)
impl<'a> PartialEq for TrustAnchor<'a>
fn eq(&self, other: &TrustAnchor<'a>) -> bool
impl<'a> StructuralPartialEq for TrustAnchor<'a>
Auto Trait Implementations
impl<'a> Freeze for TrustAnchor<'a>
impl<'a> RefUnwindSafe for TrustAnchor<'a>
impl<'a> Send for TrustAnchor<'a>
impl<'a> Sync for TrustAnchor<'a>
impl<'a> Unpin for TrustAnchor<'a>
impl<'a> UnsafeUnpin for TrustAnchor<'a>
impl<'a> UnwindSafe for TrustAnchor<'a>
Blanket Implementations
impl<T> Any for TrustAnchor<'a>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TrustAnchor<'a>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TrustAnchor<'a>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for TrustAnchor<'a>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for TrustAnchor<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for TrustAnchor<'a>
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for TrustAnchor<'a>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TrustAnchor<'a>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TrustAnchor<'a>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>