pub type BoxedResult<T, E> = Result<T, Box<ComposableError<E>>>;Expand description
Convenient result type alias for functions returning boxed composable errors.
This is the recommended return type for public API functions as it has minimal stack footprint (8 bytes) while providing full error context.
§Examples
use error_rail::prelude::*;
fn read_file(path: &str) -> BoxedResult<String, std::io::Error> {
std::fs::read_to_string(path)
.ctx("reading file")
}Aliased Type§
pub enum BoxedResult<T, E> {
Ok(T),
Err(Box<ComposableError<E>>),
}