Struct bonsaidb::client::fabruic::Certificate
pub struct Certificate(_);
Expand description
A public certificate. You can distribute it freely to peers.
Implementations§
§impl Certificate
impl Certificate
pub fn from_der<C>(certificate: C) -> Result<Certificate, Certificate>where
C: Into<Vec<u8, Global>>,
pub fn from_der<C>(certificate: C) -> Result<Certificate, Certificate>where C: Into<Vec<u8, Global>>,
Build Certificate
from DER-format. This is not meant as a full
validation of a Certificate
, it just offers some sane protections.
Errors
CertificateError::WebPki
orCertificateError::X509
if the certificate couldn’t be parsedCertificateError::Dangling
if the certificate contained uncorrelated bytesCertificateError::Expired
if the certificate has expiresCertificateError::Domain
if the certificate doesn’t contain a domain name
pub fn unchecked_from_der<C>(certificate: C) -> Certificatewhere
C: Into<Vec<u8, Global>>,
pub fn unchecked_from_der<C>(certificate: C) -> Certificatewhere C: Into<Vec<u8, Global>>,
Build Certificate
from DER-format. This skips the validation from
from_der
, which isn’t unsafe
, but could fail
nonetheless when used on an Endpoint
.
pub fn domains(&self) -> Vec<String, Global>
pub fn domains(&self) -> Vec<String, Global>
Panics
Panics if Certificate
couldn’t be parsed or contained no valid
domain names. This can’t happen if Certificate
is constructed
correctly from from_der
.
Trait Implementations§
§impl AsRef<[u8]> for Certificate
impl AsRef<[u8]> for Certificate
§impl Clone for Certificate
impl Clone for Certificate
§fn clone(&self) -> Certificate
fn clone(&self) -> Certificate
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 more§impl Debug for Certificate
impl Debug for Certificate
§impl<'de> Deserialize<'de> for Certificate
impl<'de> Deserialize<'de> for Certificate
§fn deserialize<__D>(
__deserializer: __D
) -> Result<Certificate, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<Certificate, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Hash for Certificate
impl Hash for Certificate
§impl Ord for Certificate
impl Ord for Certificate
§impl PartialEq<Certificate> for Certificate
impl PartialEq<Certificate> for Certificate
§fn eq(&self, other: &Certificate) -> bool
fn eq(&self, other: &Certificate) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd<Certificate> for Certificate
impl PartialOrd<Certificate> for Certificate
§fn partial_cmp(&self, other: &Certificate) -> Option<Ordering>
fn partial_cmp(&self, other: &Certificate) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more§impl Serialize for Certificate
impl Serialize for Certificate
§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for Certificate
impl StructuralEq for Certificate
impl StructuralPartialEq for Certificate
Auto Trait Implementations§
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnwindSafe for Certificate
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
Mutably borrows from an owned value. Read more
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
Compare self to
key
and return true
if they are equal.§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§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,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Lower case
letters are used (e.g. f9b4ca
)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
Encode the hex strict representing
self
into the result. Upper case
letters are used (e.g. F9B4CA
)