[][src]Trait cotton::prelude::ProblemWhile

pub trait ProblemWhile {
type WithContext;
    fn problem_while<impl ToString>(
        self,
        message: impl ToString
    ) -> Self::WithContext
    where
        impl ToString: ToString
;
fn problem_while_with<F, M>(self, message: F) -> Self::WithContext
    where
        F: FnOnce() -> M,
        M: ToString
; }

Convert to Problem if needed and add context to it

Associated Types

Loading content...

Required methods

fn problem_while<impl ToString>(
    self,
    message: impl ToString
) -> Self::WithContext where
    impl ToString: ToString

Add context information

fn problem_while_with<F, M>(self, message: F) -> Self::WithContext where
    F: FnOnce() -> M,
    M: ToString

Add context information from function call

Loading content...

Implementations on Foreign Types

impl<O, E> ProblemWhile for Result<O, E> where
    E: Into<Problem>, 
[src]

type WithContext = Result<O, Problem>

Loading content...

Implementors

impl ProblemWhile for Problem[src]

type WithContext = Problem

Loading content...