Trait ErrorLocation

Source
pub trait ErrorLocation<T, E>
where E: Display, Result<T, E>: Context<T, E>,
{ // Required methods fn location(self, msg: Location) -> Result<T>; fn with_location<F>(self, f: F) -> Result<T> where F: FnOnce() -> Location; }

Required Methods§

Source

fn location(self, msg: Location) -> Result<T>

Used with msg! macro

Source

fn with_location<F>(self, f: F) -> Result<T>
where F: FnOnce() -> Location,

Used with msg! macro

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T, E> ErrorLocation<T, E> for Result<T, E>
where E: Display, Result<T, E>: Context<T, E>,

Source§

fn location(self, msg: Location) -> Result<T>

Source§

fn with_location<F>(self, f: F) -> Result<T>
where F: FnOnce() -> Location,

Implementors§