#[non_exhaustive]pub struct Pin {
pub kind: String,
pub value: String,
}Expand description
One thing an account pins, as a record names it: a kind and a canonical value.
fingerprint: the SHA-256 of the whole certificate, assha256:<hex>. A renewed certificate is a new fingerprint.key: the SHA-256 of the certificate’s SubjectPublicKeyInfo, assha256:<hex>. A certificate renewed on the same key keeps it.
As text, for AccountPut::secret, a fingerprint is
sha256:<hex> (any spelling coqui-peer-tls reads) and a key is key:sha256:<hex>.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.kind: String§value: Stringsha256:<64 hex digits> of what the kind names.
Implementations§
Source§impl Pin
impl Pin
Sourcepub const FINGERPRINT: &'static str = "fingerprint"
pub const FINGERPRINT: &'static str = "fingerprint"
The kind of a pin on the whole certificate.
Sourcepub fn fingerprint(fingerprint: &PeerId) -> Self
pub fn fingerprint(fingerprint: &PeerId) -> Self
The pin on a certificate’s SHA-256 fingerprint.
Sourcepub fn key_of_certificate(der: &[u8]) -> Option<Self>
pub fn key_of_certificate(der: &[u8]) -> Option<Self>
The pin on the public key of a DER certificate; None when it does not parse.
Sourcepub fn key_of_public_key_info(info: &[u8]) -> Self
pub fn key_of_public_key_info(info: &[u8]) -> Self
The pin on a DER SubjectPublicKeyInfo.
Trait Implementations§
impl Eq for Pin
Source§impl FromValue for Pin
impl FromValue for Pin
Source§const KINDS: Kinds = ::coqui_access::guatiao::Kinds::MAP
const KINDS: Kinds = ::coqui_access::guatiao::Kinds::MAP
The kinds
from_value may accept; any
other is refused. Every impl in this crate and every derived one
says; the default, [Kinds::ANY], claims every kind, which keeps
a type that does not say out of an enum told apart by kind.Source§fn from_value(__value: &Value) -> Result<Self, MapError>
fn from_value(__value: &Value) -> Result<Self, MapError>
Performs the conversion. Read more
Source§impl Schema for Pin
impl Schema for Pin
impl StructuralPartialEq for Pin
Auto Trait Implementations§
impl Freeze for Pin
impl RefUnwindSafe for Pin
impl Send for Pin
impl Sync for Pin
impl Unpin for Pin
impl UnsafeUnpin for Pin
impl UnwindSafe for Pin
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.