[][src]Enum sequoia_openpgp::message::MessageValidity

pub enum MessageValidity {
    Message,
    MessagePrefix,
    Error(Error),
}

Whether a packet sequence is a valid OpenPGP Message.

Variants

Message

The packet sequence is a valid OpenPGP message.

MessagePrefix

The packet sequence appears to be a valid OpenPGP message that has been truncated, i.e., the packet sequence is a valid prefix of an OpenPGP message.

Error(Error)

The message is definitely not valid.

Methods

impl MessageValidity[src]

pub fn is_message(&self) -> bool[src]

Returns whether the packet sequence is a valid message.

Note: a MessageValidator will only return this after MessageValidator::finish has been called.

pub fn is_message_prefix(&self) -> bool[src]

Returns whether the packet sequence forms a valid message prefix.

Note: a MessageValidator will only return this before MessageValidator::finish has been called.

pub fn is_err(&self) -> bool[src]

Returns whether the packet sequence is definitely not a valid OpenPGP Message.

Trait Implementations

impl Debug for MessageValidity[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.