pub trait IntoValidated<T, E> {
    // Required method
    fn into_validated(self) -> Validated<HCons<T, HNil>, E>;
}
Expand description

Trait for “lifting” a given type into a Validated

Required Methods§

source

fn into_validated(self) -> Validated<HCons<T, HNil>, E>

Consumes the current Result into a Validated so that we can begin chaining

Examples
use frunk::prelude::*; // IntoValidated is in the prelude

let r1: Result<String, i32> = Err(32);
let v = r1.into_validated();
assert!(v.is_err());
Run

Implementations on Foreign Types§

source§

impl<T, E> IntoValidated<T, E> for Result<T, E>

Implementors§