Struct Fusion

Source
pub struct Fusion<A, E, T>(/* private fields */);

Implementations§

Source§

impl<A, E, T> Fusion<A, E, T>

Source

pub fn fuse<A1>(self, other: Valid<A1, E, T>) -> Fusion<A::Out, E, T>
where A: Append<A1>,

Trait Implementations§

Source§

impl<A, E, T> From<Fusion<A, E, T>> for Valid<A, E, T>

Source§

fn from(value: Fusion<A, E, T>) -> Self

Converts to this type from the input type.
Source§

impl<A, E, T> Validator<A, E, T> for Fusion<A, E, T>

Source§

fn to_result(self) -> Result<A, Vec<Cause<E, T>>>

Source§

fn is_succeed(&self) -> bool

Source§

fn is_fail(&self) -> bool

Source§

fn map<A1>(self, f: impl FnOnce(A) -> A1) -> Valid<A1, E, T>

Source§

fn foreach(self, f: impl FnMut(A)) -> Valid<A, E, T>
where A: Clone,

Source§

fn and<A1>(self, other: Valid<A1, E, T>) -> Valid<A1, E, T>

Source§

fn zip<A1>(self, other: Valid<A1, E, T>) -> Valid<(A, A1), E, T>

Source§

fn fuse<A1>(self, other: Valid<A1, E, T>) -> Fusion<(A, A1), E, T>

Source§

fn trace(self, trace: impl Into<T> + Clone) -> Valid<A, E, T>

Source§

fn fold<A1>( self, ok: impl FnOnce(A) -> Valid<A1, E, T>, err: impl FnOnce() -> Valid<A1, E, T>, ) -> Valid<A1, E, T>

Source§

fn and_then<B>(self, f: impl FnOnce(A) -> Valid<B, E, T>) -> Valid<B, E, T>

Source§

fn unit(self) -> Valid<(), E, T>

Source§

fn some(self) -> Valid<Option<A>, E, T>

Source§

fn map_to<B>(self, b: B) -> Valid<B, E, T>

Source§

fn when(self, f: impl FnOnce() -> bool) -> Valid<(), E, T>

Auto Trait Implementations§

§

impl<A, E, T> Freeze for Fusion<A, E, T>
where A: Freeze,

§

impl<A, E, T> RefUnwindSafe for Fusion<A, E, T>

§

impl<A, E, T> Send for Fusion<A, E, T>
where A: Send, E: Send, T: Send,

§

impl<A, E, T> Sync for Fusion<A, E, T>
where A: Sync, E: Sync, T: Sync,

§

impl<A, E, T> Unpin for Fusion<A, E, T>
where A: Unpin, E: Unpin, T: Unpin,

§

impl<A, E, T> UnwindSafe for Fusion<A, E, T>
where A: UnwindSafe, E: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<S, T> ValidateInto<T> for S
where T: ValidateFrom<S>,

Source§

type Error = <T as ValidateFrom<S>>::Error

Source§

type Trace = <T as ValidateFrom<S>>::Trace

Source§

fn validate_into( self, ) -> Valid<T, <S as ValidateInto<T>>::Error, <S as ValidateInto<T>>::Trace>