Result

Type Alias Result 

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

Result type alias for convenience

All public functions in the ffcv library return this type alias for consistent error handling.

§Example

use ffcv::{Result, parse_prefs_js};

fn parse_and_check(content: &str) -> Result<()> {
    let config = parse_prefs_js(content)?;
    // ... do something with config
    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