Skip to main content

Result

Type Alias Result 

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

Convenient result alias for this crate.

§Examples

fn needs_windows() -> win_desktop_utils::Result<()> {
    Err(win_desktop_utils::Error::Unsupported("example"))
}

assert!(matches!(
    needs_windows(),
    Err(win_desktop_utils::Error::Unsupported("example")),
));

Aliased Type§

pub 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