pub struct Certificate(pub Data<Bytes>);Expand description
An NDN certificate: a Data packet whose content is a public key,
signed by an issuer.
Tuple Fields§
§0: Data<Bytes>Implementations§
Source§impl Certificate
impl Certificate
Sourcepub fn load_file<P>(path: P) -> Result<Self, NdnError>
pub fn load_file<P>(path: P) -> Result<Self, NdnError>
Reads and decodes a base64-encoded certificate file (just the certificate, without an accompanying private key).
Sourcepub fn name(&self) -> &Name
pub fn name(&self) -> &Name
The certificate’s name, of the form /<identity>/KEY/<key-id>/<issuer-id>/<version>.
Sourcepub fn identity(&self) -> Name
pub fn identity(&self) -> Name
The identity this certificate belongs to: its name with the
trailing KEY/<key-id>/<issuer-id>/<version> components removed.
Sourcepub fn name_locator(&self) -> KeyLocator
pub fn name_locator(&self) -> KeyLocator
A KeyLocator pointing at this certificate by name, for use in a
SignatureInfo/InterestSignatureInfo.
Sourcepub fn signature_info(&self) -> Option<&SignatureInfo>
pub fn signature_info(&self) -> Option<&SignatureInfo>
The signature info of the Data packet backing this certificate, i.e. how the issuer signed it.
Trait Implementations§
Source§impl Clone for Certificate
impl Clone for Certificate
Source§fn clone(&self) -> Certificate
fn clone(&self) -> Certificate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Certificate
impl Debug for Certificate
Source§impl Hash for Certificate
impl Hash for Certificate
Source§impl TlvDecode for Certificate
impl TlvDecode for Certificate
Auto Trait Implementations§
impl !Freeze for Certificate
impl RefUnwindSafe for Certificate
impl Send for Certificate
impl Sync for Certificate
impl Unpin for Certificate
impl UnsafeUnpin for Certificate
impl UnwindSafe for Certificate
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more