Skip to main content

Or

Struct Or 

Source
pub struct Or<E1, E2> { /* private fields */ }

Trait Implementations§

Source§

impl<E1: Clone, E2: Clone> Clone for Or<E1, E2>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<E1: Copy, E2: Copy> Copy for Or<E1, E2>

Source§

impl<E1: Debug, E2: Debug> Debug for Or<E1, E2>

Source§

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

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

impl<'a, E1, E2> Endpoint<'a> for Or<E1, E2>
where E1: Endpoint<'a>, E2: Endpoint<'a>,

Source§

type Output = (Wrapped<<E1 as Endpoint<'a>>::Output, <E2 as Endpoint<'a>>::Output>,)

The inner type associated with this endpoint.
Source§

type Future = OrFuture<<E1 as Endpoint<'a>>::Future, <E2 as Endpoint<'a>>::Future>

The type of value which will be returned from apply.
Source§

fn apply(&'a self, ecx: &mut ApplyContext<'_>) -> ApplyResult<Self::Future>

Perform checking the incoming HTTP request and returns an instance of the associated Future if matched.
Source§

fn with_output<T: Tuple>(self) -> Self
where Self: Endpoint<'a, Output = T> + Sized,

Add an annotation that the associated type Output is fixed to T.
Source§

fn wrap<W>(self, wrapper: W) -> W::Endpoint
where Self: Sized, W: Wrapper<'a, Self>,

Converts self using the provided Wrapper.

Auto Trait Implementations§

§

impl<E1, E2> Freeze for Or<E1, E2>
where E1: Freeze, E2: Freeze,

§

impl<E1, E2> RefUnwindSafe for Or<E1, E2>

§

impl<E1, E2> Send for Or<E1, E2>
where E1: Send, E2: Send,

§

impl<E1, E2> Sync for Or<E1, E2>
where E1: Sync, E2: Sync,

§

impl<E1, E2> Unpin for Or<E1, E2>
where E1: Unpin, E2: Unpin,

§

impl<E1, E2> UnsafeUnpin for Or<E1, E2>
where E1: UnsafeUnpin, E2: UnsafeUnpin,

§

impl<E1, E2> UnwindSafe for Or<E1, E2>
where E1: UnwindSafe, E2: 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<'a, E> EndpointWrapExt<'a> for E
where E: Endpoint<'a>,

Source§

fn map<F>(self, f: F) -> <Map<Self::Output, F> as Wrapper<'a, Self>>::Endpoint
where F: Func<Self::Output> + 'a,

Source§

fn and_then<F>( self, f: F, ) -> <AndThen<Self::Output, F> as Wrapper<'a, Self>>::Endpoint
where F: Func<Self::Output> + 'a, F::Out: IntoFuture<Error = Error> + 'a,

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<'a, E> IntoEndpoint<'a> for E
where E: Endpoint<'a>,

Source§

type Output = <E as Endpoint<'a>>::Output

The inner type of associated Endpoint.
Source§

type Endpoint = E

The type of transformed Endpoint.
Source§

fn into_endpoint(self) -> <E as IntoEndpoint<'a>>::Endpoint

Consume itself and transform into an Endpoint.
Source§

impl<'a, E> IntoEndpointExt<'a> for E
where E: IntoEndpoint<'a>,

Source§

fn and<E>(self, other: E) -> And<Self::Endpoint, E::Endpoint>
where E: IntoEndpoint<'a>, Self::Output: Combine<E::Output>,

Create an endpoint which evaluates self and e and returns a pair of their tasks. Read more
Source§

fn or<E>(self, other: E) -> Or<Self::Endpoint, E::Endpoint>
where E: IntoEndpoint<'a>,

Create an endpoint which evaluates self and e sequentially. Read more
Source§

fn or_strict<E>(self, other: E) -> OrStrict<Self::Endpoint, E::Endpoint>
where E: IntoEndpoint<'a, Output = Self::Output>,

Create an endpoint which evaluates self and e sequentially. Read more
Source§

impl<'a, E> OutputEndpoint<'a> for E
where E: Endpoint<'a>, <E as Endpoint<'a>>::Output: Output,

Source§

type Output = <E as Endpoint<'a>>::Output

Source§

type Future = <E as Endpoint<'a>>::Future

Source§

fn apply_output( &'a self, cx: &mut ApplyContext<'_>, ) -> Result<<E as OutputEndpoint<'a>>::Future, ApplyError>

Source§

impl<'a, E> SendEndpoint<'a> for E
where E: Endpoint<'a>, <E as Endpoint<'a>>::Future: Send,

Source§

type Output = <E as Endpoint<'a>>::Output

Source§

type Future = <E as Endpoint<'a>>::Future

Source§

fn apply_send( &'a self, cx: &mut ApplyContext<'_>, ) -> Result<<E as SendEndpoint<'a>>::Future, ApplyError>

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.