Skip to main content

Result

Type Alias Result 

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

Result alias used throughout the crate.

Equivalent to std::result::Result<T, MatchingError>.

use thing_matcher::Result;
fn doubled(x: i32) -> Result<i32> { Ok(x * 2) }
assert_eq!(doubled(3).unwrap(), 6);

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(MatchingError)

Contains the error value