Type Alias Result

Source
pub type Result<T> = Result<T, Error>;
Expand description

A type alias for Result<T, Error>.

This alias simplifies the usage of Result in the context of errors in your application. Instead of writing out std::result::Result<T, Error> every time, you can now use Result<T> for better readability and convenience.

§Example

fn example() -> cdumay_error::Result<i32> {
    Err(cdumay_error::Error::default())
}

Aliased Type§

enum Result<T> {
    Ok(T),
    Err(Error),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value