logo
pub struct NullPolicy {}
Expand description

The Null Policy.

Danger, here be dragons.

This policy imposes no additional policy, i.e., accepts everything. This includes the MD5 hash algorithm, and SED packets.

The Null policy has a limited set of valid use cases, e.g., packet statistics. For other purposes, it is more advisable to use the StandardPolicy and adjust it by selectively allowing items considered insecure by default, e.g., via StandardPolicy::accept_hash function. If this is still too inflexible consider creating a specialized policy based on the StandardPolicy as the example for StandardPolicy illustrates.

Implementations

Instantiates a new NullPolicy.

Trait Implementations

Formats the value using the given formatter. Read more

Returns an error if the signature violates the policy. Read more

Returns an error if the key violates the policy. Read more

Returns an error if the symmetric encryption algorithm violates the policy. Read more

Returns an error if the AEAD mode violates the policy. Read more

Returns an error if the packet violates the policy. Read more

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 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.