[][src]Struct gtk::Error

pub struct Error(_);

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

Methods

impl Error
[src]

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 Clone for Error
[src]

Performs copy-assignment from source. Read more

impl Display for Error
[src]

impl Ord for Error
[src]

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Eq for Error
[src]

impl Send for Error
[src]

impl PartialOrd<Error> for Error
[src]

impl Error for Error
[src]

Deprecating in 1.33.0

: replaced by Error::source, which can support downcasting

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

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

impl StaticType for Error
[src]

impl Hash for Error
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq<Error> for Error
[src]

impl Debug for Error
[src]

impl Sync for Error
[src]

Blanket Implementations

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

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T> From for T
[src]

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

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

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, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T> ToSendValue for T where
    T: ToValue + SetValue + Send + ?Sized
[src]