Skip to main content

SortContext

Trait SortContext 

Source
pub trait SortContext<T> {
    // Required methods
    fn with_context<F>(self, f: F) -> SortResult<T>
       where F: FnOnce() -> String;
    fn with_file_context(self, filename: &str) -> SortResult<T>;
}
Expand description

Context trait for adding context to errors

Required Methods§

Source

fn with_context<F>(self, f: F) -> SortResult<T>
where F: FnOnce() -> String,

Source

fn with_file_context(self, filename: &str) -> SortResult<T>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> SortContext<T> for Result<T, Error>

Source§

fn with_context<F>(self, f: F) -> SortResult<T>
where F: FnOnce() -> String,

Source§

fn with_file_context(self, filename: &str) -> SortResult<T>

Implementors§