Skip to main content

Context

Trait Context 

Source
pub trait Context<T> {
    // Required methods
    fn rs_context(self, msg: impl Into<String>) -> Result<T>;
    fn rs_with_context<F>(self, f: F) -> Result<T>
       where F: FnOnce() -> String;
}

Required Methods§

Source

fn rs_context(self, msg: impl Into<String>) -> Result<T>

Source

fn rs_with_context<F>(self, f: F) -> Result<T>
where F: FnOnce() -> String,

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> Context<T> for Result<T, Error>

Source§

fn rs_context(self, msg: impl Into<String>) -> Result<T>

Source§

fn rs_with_context<F>(self, f: F) -> Result<T>
where F: FnOnce() -> String,

Implementors§

Source§

impl<T> Context<T> for rsomics_common::Result<T>