pub struct CertPool { /* private fields */ }Expand description
An unordered collection of certificates used as input to path building.
Certificates are stored by DER bytes and decoded on demand. Add all candidate intermediate certificates here; the path builder will select and order the subset that forms a valid path to a trust anchor.
Note: Hash is not derived because x509_cert::Certificate does not
currently implement Hash (upstream limitation); CertPool cannot be
used as a hash-map key until that changes.
Note: PartialEq/Eq are not derived. CertPool is documented as an
unordered bag, so a derived implementation (which compares the internal
Vec in insertion order) would be semantically wrong.
Implementations§
Source§impl CertPool
impl CertPool
Sourcepub fn add(&mut self, cert: Certificate)
pub fn add(&mut self, cert: Certificate)
Add a certificate to the pool.
Sourcepub fn iter(&self) -> Iter<'_, Certificate>
pub fn iter(&self) -> Iter<'_, Certificate>
Iterate over the certificates in the pool.
Equivalent to (&pool).into_iter().
Trait Implementations§
Source§impl Extend<CertificateInner> for CertPool
impl Extend<CertificateInner> for CertPool
Source§fn extend<I: IntoIterator<Item = Certificate>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = Certificate>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<CertificateInner> for CertPool
impl FromIterator<CertificateInner> for CertPool
Source§fn from_iter<I: IntoIterator<Item = Certificate>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = Certificate>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<'a> IntoIterator for &'a CertPool
impl<'a> IntoIterator for &'a CertPool
Source§impl IntoIterator for CertPool
impl IntoIterator for CertPool
Auto Trait Implementations§
impl Freeze for CertPool
impl RefUnwindSafe for CertPool
impl Send for CertPool
impl Sync for CertPool
impl Unpin for CertPool
impl UnsafeUnpin for CertPool
impl UnwindSafe for CertPool
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