Result

Type Alias Result 

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

Result type alias for vanguards-rs operations.

This is a convenience alias for std::result::Result<T, Error> used throughout the vanguards-rs library.

§Example

use vanguards_rs::{Config, Result};

fn load_and_validate_config() -> Result<Config> {
    let config = Config::from_file(std::path::Path::new("vanguards.conf"))?;
    config.validate()?;
    Ok(config)
}

§See Also

  • Error - The error type used in this result

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