Struct fabruic::PrivateKey
source · pub struct PrivateKey(/* private fields */);
Expand description
Implementations§
source§impl PrivateKey
impl PrivateKey
sourcepub fn from_der<P: Into<Vec<u8>>>(private_key: P) -> Result<Self, PrivateKey>
pub fn from_der<P: Into<Vec<u8>>>(private_key: P) -> Result<Self, PrivateKey>
Build PrivateKey
from DER-format. This is not meant as a full
validation of a PrivateKey
, it just offers some sane protections.
Errors
error::PrivateKey
if the certificate couldn’t be parsed.
sourcepub fn unchecked_from_der<P: Into<Vec<u8>>>(private_key: P) -> Self
pub fn unchecked_from_der<P: Into<Vec<u8>>>(private_key: P) -> Self
Build PrivateKey
from DER-format. This skips the validation from
from_der
, which isn’t unsafe
, but could fail
nonetheless when used on an Endpoint
.
Trait Implementations§
source§impl Clone for PrivateKey
impl Clone for PrivateKey
source§fn clone(&self) -> PrivateKey
fn clone(&self) -> PrivateKey
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 Dangerous for PrivateKey
impl Dangerous for PrivateKey
source§impl Debug for PrivateKey
impl Debug for PrivateKey
source§impl<'de> Deserialize<'de> for PrivateKey
impl<'de> Deserialize<'de> for PrivateKey
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for PrivateKey
impl Hash for PrivateKey
source§impl Ord for PrivateKey
impl Ord for PrivateKey
source§fn cmp(&self, other: &PrivateKey) -> Ordering
fn cmp(&self, other: &PrivateKey) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<PrivateKey> for PrivateKey
impl PartialEq<PrivateKey> for PrivateKey
source§fn eq(&self, other: &PrivateKey) -> bool
fn eq(&self, other: &PrivateKey) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PrivateKey> for PrivateKey
impl PartialOrd<PrivateKey> for PrivateKey
source§fn partial_cmp(&self, other: &PrivateKey) -> Option<Ordering>
fn partial_cmp(&self, other: &PrivateKey) -> 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 moresource§impl Zeroize for PrivateKey
impl Zeroize for PrivateKey
impl Eq for PrivateKey
impl StructuralEq for PrivateKey
impl StructuralPartialEq for PrivateKey
Auto Trait Implementations§
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
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.