/// The inner types of ValidationError can be mapped to another types by
/// applying two map functions for error and transient errors respectively.
The inner types of ValidationError can be mapped to another types by
applying two map functions for error and transient errors respectively.
The inner types of ValidationError can be mapped to another types by applying two map functions for error and transient errors respectively .
pub fn map<Q, S, F: Fn(P) -> Q, G: Fn(T) -> S>(self, f: F, g: G) -> ValidationError<Q, S> {
        match self {
            ValidationError::Permanent(p) => ValidationError::Permanent(f(p)),
            ValidationError::Transient(t) => ValidationError::Transient(g(t)),
        }
    }
pub fn map < Q , S , F : Fn ( P ) -> Q , G : Fn ( T ) -> S > ( self , f : F , g : G ) -> ValidationError < Q , S > { match self { ValidationError :: Permanent ( p ) => ValidationError :: Permanent ( f ( p ) ) , ValidationError :: Transient ( t ) => ValidationError :: Transient ( g ( t ) ) , } }
The inner types of ValidationError can be mapped to another types by
applying two map functions for error and transient errors respectively.
The inner types of ValidationError can be mapped to another types by applying two map functions for error and transient errors respectively .
self
f
F
g
G