AllErrs

Enum AllErrs 

Source
pub enum AllErrs<C, D = ()> {
    Ok(C),
    Err(Vec<AppError<D>>),
}
Expand description

Helper type to collect a IntoIter<Item = Result<T, AppError>> into a Result<C, AppError> with all of the errors instead of the first.

Variants§

§

Ok(C)

§

Err(Vec<AppError<D>>)

Trait Implementations§

Source§

impl<C, D> Debug for AllErrs<C, D>
where C: Debug, D: Debug + 'static,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<C, D> Default for AllErrs<C, D>
where C: Default,

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<C, U, D> Extend<Result<U, AppError<D>>> for AllErrs<C, D>
where C: Extend<U>,

Source§

fn extend<T: IntoIterator<Item = Result<U, AppError<D>>>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
Source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
Source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Source§

impl<C, T, D> FromIterator<Result<T, AppError<D>>> for AllErrs<C, D>
where C: Default + Extend<T>,

Source§

fn from_iter<I>(iter: I) -> Self
where I: IntoIterator<Item = Result<T, AppError<D>>>,

Creates a value from an iterator. Read more
Source§

impl<C, D> Try for AllErrs<C, D>

Source§

type Output = C

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value produced by ? when not short-circuiting.
Source§

type Residual = AllErrsResidue<D>

🔬This is a nightly-only experimental API. (try_trait_v2)
The type of the value passed to FromResidual::from_residual as part of ? when short-circuiting. Read more
Source§

fn from_output(output: Self::Output) -> Self

🔬This is a nightly-only experimental API. (try_trait_v2)
Constructs the type from its Output type. Read more
Source§

fn branch(self) -> ControlFlow<Self::Residual, Self::Output>

🔬This is a nightly-only experimental API. (try_trait_v2)
Used in ? to decide whether the operator should produce a value (because this returned ControlFlow::Continue) or propagate a value back to the caller (because this returned ControlFlow::Break). Read more

Auto Trait Implementations§

§

impl<C, D> Freeze for AllErrs<C, D>
where C: Freeze,

§

impl<C, D> RefUnwindSafe for AllErrs<C, D>

§

impl<C, D> Send for AllErrs<C, D>
where C: Send, D: Sync + Send,

§

impl<C, D> Sync for AllErrs<C, D>
where C: Sync, D: Sync + Send,

§

impl<C, D> Unpin for AllErrs<C, D>
where C: Unpin,

§

impl<C, D> UnwindSafe for AllErrs<C, D>

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.