logo
pub struct SecretDocument(_);
Expand description

Secret Document type.

Useful for formats which represent potentially secret data, such as cryptographic keys.

This type provides additional hardening such as ensuring that the contents are zeroized-on-drop, and also using more restrictive file permissions when writing files to disk.

Implementations

Borrow the inner serialized bytes of this document.

Return an allocated ASN.1 DER serialization as a byte vector.

Get the length of the encoded ASN.1 DER in bytes.

Try to decode the inner ASN.1 DER message as the given type.

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.

Write ASN.1 DER document to a file.

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

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

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

Converts to this type from the input type.

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.

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.