BoxedResult

Type Alias BoxedResult 

Source
pub type BoxedResult<T, E> = BoxedComposableResult<T, E>;
Expand description

Shorter alias for BoxedComposableResult.

This is the recommended type alias for function return types. It has minimal stack footprint (8 bytes) while providing full error context.

§Type Parameters

  • T - The success value type
  • E - The core error type

§Examples

use error_rail::BoxedResult;

fn read_file(path: &str) -> BoxedResult<String, std::io::Error> {
    // ...
}

Aliased Type§

pub enum BoxedResult<T, E> {
    Ok(T),
    Err(Box<ComposableError<E>>),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Box<ComposableError<E>>)

Contains the error value