Skip to main content

Result

Type Alias Result 

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

Shim result type: Result<T, Error> with the shim’s own Error.

§Examples

use noyalib::compat::serde_yaml as syml;
fn parse(s: &str) -> syml::Result<syml::Value> {
    syml::from_str(s)
}
assert!(parse("a: 1\n").is_ok());

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