pub enum ClientResponse<F, C = ()> {
Throw(F),
Continue(C),
}
Expand description
The return type of ErrorHandler::handle_error
. This type (or a suitable alias)
should be part of your library’s public interface. Additionally you may want to
provide methods or constants for your users’ convenience.
Variants§
Trait Implementations§
Source§impl<F: Clone, C: Clone> Clone for ClientResponse<F, C>
impl<F: Clone, C: Clone> Clone for ClientResponse<F, C>
Source§fn clone(&self) -> ClientResponse<F, C>
fn clone(&self) -> ClientResponse<F, C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<F: Ord, C: Ord> Ord for ClientResponse<F, C>
impl<F: Ord, C: Ord> Ord for ClientResponse<F, C>
Source§fn cmp(&self, other: &ClientResponse<F, C>) -> Ordering
fn cmp(&self, other: &ClientResponse<F, C>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F: PartialOrd, C: PartialOrd> PartialOrd for ClientResponse<F, C>
impl<F: PartialOrd, C: PartialOrd> PartialOrd for ClientResponse<F, C>
Source§impl<F, C> Try for ClientResponse<F, C>
impl<F, C> Try for ClientResponse<F, C>
Source§type Output = C
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 = Residual<F>
type Residual = Residual<F>
🔬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 moreSource§fn from_output(output: Self::Output) -> Self
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 moreSource§fn branch(self) -> ControlFlow<Self::Residual, Self::Output>
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 moreimpl<F: Copy, C: Copy> Copy for ClientResponse<F, C>
impl<F: Eq, C: Eq> Eq for ClientResponse<F, C>
impl<F, C> StructuralPartialEq for ClientResponse<F, C>
Auto Trait Implementations§
impl<F, C> Freeze for ClientResponse<F, C>
impl<F, C> RefUnwindSafe for ClientResponse<F, C>where
F: RefUnwindSafe,
C: RefUnwindSafe,
impl<F, C> Send for ClientResponse<F, C>
impl<F, C> Sync for ClientResponse<F, C>
impl<F, C> Unpin for ClientResponse<F, C>
impl<F, C> UnwindSafe for ClientResponse<F, C>where
F: UnwindSafe,
C: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> MaybeTryFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> MaybeTryFrom<T> for Uwhere
U: TryFrom<T>,
Source§fn maybe_try_from(item: T) -> NullableResult<U, <U as MaybeTryFrom<T>>::Error>
fn maybe_try_from(item: T) -> NullableResult<U, <U as MaybeTryFrom<T>>::Error>
Convert a
T
to NullableResult<Self, Self::Error>
Source§impl<T, U> MaybeTryInto<U> for Twhere
U: MaybeTryFrom<T>,
impl<T, U> MaybeTryInto<U> for Twhere
U: MaybeTryFrom<T>,
Source§type Error = <U as MaybeTryFrom<T>>::Error
type Error = <U as MaybeTryFrom<T>>::Error
The type that is returned if conversion fails
Source§fn maybe_try_into(self) -> NullableResult<U, <T as MaybeTryInto<U>>::Error>
fn maybe_try_into(self) -> NullableResult<U, <T as MaybeTryInto<U>>::Error>
Convert a
Self
to NullableResult<T, Self::Error>
Source§impl<T, U> TryFromFatal<T> for Uwhere
U: MaybeTryFrom<T>,
impl<T, U> TryFromFatal<T> for Uwhere
U: MaybeTryFrom<T>,
Source§type Error = <U as MaybeTryFrom<T>>::Error
type Error = <U as MaybeTryFrom<T>>::Error
The type that is returned if conversion fails
Source§type Fatality = Infallible
type Fatality = Infallible
The type that is returned if conversion fails fatally
Source§fn try_from_fatal(
item: T,
) -> TieredResult<U, <U as TryFromFatal<T>>::Error, <U as TryFromFatal<T>>::Fatality>
fn try_from_fatal( item: T, ) -> TieredResult<U, <U as TryFromFatal<T>>::Error, <U as TryFromFatal<T>>::Fatality>
Convert a
T
to TieredResult<Self, Self::Error, Self::Fatality>
Source§impl<T, U> TryIntoFatal<U> for Twhere
U: TryFromFatal<T>,
impl<T, U> TryIntoFatal<U> for Twhere
U: TryFromFatal<T>,
Source§type Error = <U as TryFromFatal<T>>::Error
type Error = <U as TryFromFatal<T>>::Error
The type that is returned if conversion fails
Source§type Fatality = <U as TryFromFatal<T>>::Fatality
type Fatality = <U as TryFromFatal<T>>::Fatality
The type that is returned if conversion fails fatally
Source§fn try_into_fatal(
self,
) -> TieredResult<U, <T as TryIntoFatal<U>>::Error, <T as TryIntoFatal<U>>::Fatality>
fn try_into_fatal( self, ) -> TieredResult<U, <T as TryIntoFatal<U>>::Error, <T as TryIntoFatal<U>>::Fatality>
Convert a
Self
to TieredResult<T, Self::Error, Self::Fatality>