Type Alias Result

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

A specialized Result type used by mlua’s API.

Aliased Type§

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

Trait Implementations§

Source§

impl<T> ErrorContext for Result<T>

Source§

fn context<C: Display>(self, context: C) -> Self

Wraps the error value with additional context.
Source§

fn with_context<C: Display>(self, f: impl FnOnce(&Error) -> C) -> Self

Wrap the error value with additional context that is evaluated lazily only once an error does occur.