Struct gmime::Error[]

pub struct Error(_);

A generic error capable of representing various error domains (types).

Methods

impl Error

Creates an error with supplied error enum variant and message.

Checks if the error domain matches T.

Tries to convert to a specific error enum.

Returns Some if the error belongs to the enum's error domain and None otherwise.

Examples

This example is not tested
if let Some(file_error) = error.kind::<FileError>() {
    match file_error {
        FileError::Exist => ...
        FileError::Isdir => ...
        ...
    }
}
This example is not tested
match error {
    Some(FileError::Exist) => ...
    Some(FileError::Isdir) => ...
    ...
}

Trait Implementations

impl Sync for Error

impl Clone for Error

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Error

Formats the value using the given formatter. Read more

impl Error for Error

A short description of the error. Read more

The lower-level cause of this error, if any. Read more

impl Display for Error

Formats the value using the given formatter. Read more

impl StaticType for Error

Returns the type identifier of Self.

impl Send for Error