ClientResponse

Enum ClientResponse 

Source
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§

§

Throw(F)

Stop processing

§

Continue(C)

Try to continue

Trait Implementations§

Source§

impl<F: Clone, C: Clone> Clone for ClientResponse<F, C>

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl<F: Debug, C: Debug> Debug for ClientResponse<F, C>

Source§

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

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

impl<F: Hash, C: Hash> Hash for ClientResponse<F, C>

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<F: Ord, C: Ord> Ord for ClientResponse<F, C>

Source§

fn cmp(&self, other: &ClientResponse<F, C>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl<F: PartialEq, C: PartialEq> PartialEq for ClientResponse<F, C>

Source§

fn eq(&self, other: &ClientResponse<F, C>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<F: PartialOrd, C: PartialOrd> PartialOrd for ClientResponse<F, C>

Source§

fn partial_cmp(&self, other: &ClientResponse<F, C>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl<F, C> Try for ClientResponse<F, C>

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 = 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 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
Source§

impl<F: Copy, C: Copy> Copy for ClientResponse<F, C>

Source§

impl<F: Eq, C: Eq> Eq for ClientResponse<F, C>

Source§

impl<F, C> StructuralPartialEq for ClientResponse<F, C>

Auto Trait Implementations§

§

impl<F, C> Freeze for ClientResponse<F, C>
where F: Freeze, C: Freeze,

§

impl<F, C> RefUnwindSafe for ClientResponse<F, C>

§

impl<F, C> Send for ClientResponse<F, C>
where F: Send, C: Send,

§

impl<F, C> Sync for ClientResponse<F, C>
where F: Sync, C: Sync,

§

impl<F, C> Unpin for ClientResponse<F, C>
where F: Unpin, C: Unpin,

§

impl<F, C> UnwindSafe for ClientResponse<F, C>
where F: UnwindSafe, C: 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> MaybeTryFrom<T> for U
where U: TryFrom<T>,

Source§

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

The type that is returned if conversion fails
Source§

fn maybe_try_from(item: T) -> NullableResult<U, <U as MaybeTryFrom<T>>::Error>

Source§

impl<T, U> MaybeTryInto<U> for T
where U: MaybeTryFrom<T>,

Source§

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>

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> TryFromFatal<T> for U
where U: MaybeTryFrom<T>,

Source§

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

The type that is returned if conversion fails
Source§

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>

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<T, U> TryIntoFatal<U> for T
where U: TryFromFatal<T>,

Source§

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

The type that is returned if conversion fails
Source§

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>