Enum bo::validation::Validation[][src]

pub enum Validation<E, A> {
    Success(A),
    Failure(E),
}

Variants

Success(A)
Failure(E)

Implementations

impl<E: Clone + Semigroup, A: Clone> Validation<E, A>[src]

pub fn map<B, F>(&self, f: F) -> Validation<E, B> where
    F: FnOnce(A) -> B, 
[src]

pub fn get_or_else(self, fallback: A) -> A[src]

pub fn unwrap(self) -> A[src]

pub fn is_success(&self) -> bool[src]

pub fn is_failure(&self) -> bool[src]

pub fn get_err(self) -> E[src]

Trait Implementations

impl<E: Clone, A: Clone> Clone for Validation<E, A>[src]

impl<E: Debug, A: Debug> Debug for Validation<E, A>[src]

Auto Trait Implementations

impl<E, A> RefUnwindSafe for Validation<E, A> where
    A: RefUnwindSafe,
    E: RefUnwindSafe

impl<E, A> Send for Validation<E, A> where
    A: Send,
    E: Send

impl<E, A> Sync for Validation<E, A> where
    A: Sync,
    E: Sync

impl<E, A> Unpin for Validation<E, A> where
    A: Unpin,
    E: Unpin

impl<E, A> UnwindSafe for Validation<E, A> where
    A: UnwindSafe,
    E: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.