Struct fabruic::CertificateChain
source · pub struct CertificateChain(/* private fields */);
Expand description
A public Certificate
chain, used to prese
Implementations§
source§impl CertificateChain
impl CertificateChain
sourcepub fn from_certificates<C: Into<Vec<Certificate>>>(
certificates: C
) -> Result<Self, CertificateChain>
pub fn from_certificates<C: Into<Vec<Certificate>>>( certificates: C ) -> Result<Self, CertificateChain>
Builds a new CertificateChain
from the given Certificate
s and
validates it.
This presumes that Certificate
s are valid, see
Certificate::from_der
.
Errors
TODO: this doesn’t do any validation yet
sourcepub fn unchecked_from_certificates<C: Into<Vec<Certificate>>>(
certificates: C
) -> Self
pub fn unchecked_from_certificates<C: Into<Vec<Certificate>>>( certificates: C ) -> Self
Builds CertificateChain
from the given Certificate
s. This skips
the validation from from_certificates
,
which isn’t unsafe
, but could fail nonetheless when used on an
Endpoint
.
sourcepub fn into_end_entity_certificate(self) -> Certificate
pub fn into_end_entity_certificate(self) -> Certificate
Returns the end-entity Certificate
.
Panics
If the CertificateChain
is invalid. This can’t happen if validated
through from_certificates
.
sourcepub fn end_entity_certificate(&self) -> &Certificate
pub fn end_entity_certificate(&self) -> &Certificate
Returns a reference to the end-entity Certificate
.
Panics
If the CertificateChain
is invalid. This can’t happen if validated
through from_certificates
.
sourcepub fn iter(&self) -> Iter<'_, Certificate>
pub fn iter(&self) -> Iter<'_, Certificate>
Returns an iterator over the CertificateChain
.
sourcepub fn get(&self, index: usize) -> Option<&Certificate>
pub fn get(&self, index: usize) -> Option<&Certificate>
Provides a reference to the Certificate
at the given index.
Trait Implementations§
source§impl Clone for CertificateChain
impl Clone for CertificateChain
source§fn clone(&self) -> CertificateChain
fn clone(&self) -> CertificateChain
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CertificateChain
impl Debug for CertificateChain
source§impl<'de> Deserialize<'de> for CertificateChain
impl<'de> Deserialize<'de> for CertificateChain
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl Hash for CertificateChain
impl Hash for CertificateChain
source§impl Index<usize> for CertificateChain
impl Index<usize> for CertificateChain
source§impl IntoIterator for CertificateChain
impl IntoIterator for CertificateChain
§type IntoIter = IntoIter<<CertificateChain as IntoIterator>::Item, Global>
type IntoIter = IntoIter<<CertificateChain as IntoIterator>::Item, Global>
§type Item = Certificate
type Item = Certificate
source§impl Ord for CertificateChain
impl Ord for CertificateChain
source§fn cmp(&self, other: &CertificateChain) -> Ordering
fn cmp(&self, other: &CertificateChain) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<CertificateChain> for CertificateChain
impl PartialEq<CertificateChain> for CertificateChain
source§fn eq(&self, other: &CertificateChain) -> bool
fn eq(&self, other: &CertificateChain) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<CertificateChain> for CertificateChain
impl PartialOrd<CertificateChain> for CertificateChain
source§fn partial_cmp(&self, other: &CertificateChain) -> Option<Ordering>
fn partial_cmp(&self, other: &CertificateChain) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for CertificateChain
impl Serialize for CertificateChain
source§impl TryFrom<Vec<Certificate, Global>> for CertificateChain
impl TryFrom<Vec<Certificate, Global>> for CertificateChain
§type Error = CertificateChain
type Error = CertificateChain
impl Eq for CertificateChain
impl StructuralEq for CertificateChain
impl StructuralPartialEq for CertificateChain
Auto Trait Implementations§
impl RefUnwindSafe for CertificateChain
impl Send for CertificateChain
impl Sync for CertificateChain
impl Unpin for CertificateChain
impl UnwindSafe for CertificateChain
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.