logo
pub struct PublicKeyDocument(_);
This is supported on crate feature alloc only.
Expand description

SPKI public key document.

This type provides storage for SubjectPublicKeyInfo encoded as ASN.1 DER with the invariant that the contained-document is “well-formed”, i.e. it will parse successfully according to this crate’s parsing rules.

Trait Implementations

Performs the conversion.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize object from ASN.1 DER-encoded SubjectPublicKeyInfo (binary format). Read more

This is supported on crate feature pem only.

Deserialize PEM-encoded SubjectPublicKeyInfo. Read more

This is supported on crate feature std only.

Load public key object from an ASN.1 DER-encoded file on the local filesystem (binary format). Read more

This is supported on crate features pem and std only.

Load public key object from a PEM-encoded file on the local filesystem.

This is supported on crate feature alloc only.

Deserialize SPKI public key from a PublicKeyDocument.

ASN.1 message type this document decodes to.

Does this type contain potentially sensitive data? Read more

Borrow the inner serialized bytes of this document.

Return an allocated ASN.1 DER serialization as a boxed slice.

Decode this document as ASN.1 DER.

Create a new document from the provided ASN.1 DER bytes.

Encode the provided type as ASN.1 DER.

Decode ASN.1 DER document from PEM.

Encode ASN.1 DER document as a PEM string.

Read ASN.1 DER document from a file.

Read PEM-encoded ASN.1 DER document from a file.

Write ASN.1 DER document to a file.

Write PEM-encoded ASN.1 DER document to a file.

This is supported on crate feature alloc only.

Serialize a PublicKeyDocument containing a SPKI-encoded public key.

This is supported on crate features alloc and pem only.

Serialize this public key as PEM-encoded SPKI with the given LineEnding.

This is supported on crate features alloc and std only.

Write ASN.1 DER-encoded public key to the given path

This is supported on crate features pem and std and alloc only.

Write ASN.1 DER-encoded public key to the given path

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Expected PEM type label for a given document, e.g. "PRIVATE KEY"

Validate that a given label matches the expected label.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.