libbpf_rs

Type Alias Result

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

A result type using our Error by default.

Aliased Type§

enum Result<T, E = Error> {
    Ok(T),
    Err(E),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

Contains the error value

Trait Implementations§

Source§

impl<T, E> ErrorExt for Result<T, E>
where E: ErrorExt,

Source§

type Output = Result<T, <E as ErrorExt>::Output>

The output type produced by context and with_context.
Source§

fn context<C>(self, context: C) -> Self::Output
where C: IntoCowStr,

Add context to this error.
Source§

fn with_context<C, F>(self, f: F) -> Self::Output
where C: IntoCowStr, F: FnOnce() -> C,

Add context to this error, using a closure for lazy evaluation.