Abort

Struct Abort 

Source
pub struct Abort<F> { /* private fields */ }

Trait Implementations§

Source§

impl<F: Clone> Clone for Abort<F>

Source§

fn clone(&self) -> Abort<F>

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> Debug for Abort<F>

Source§

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

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

impl<F, E> Endpoint for Abort<F>
where F: Fn(&mut Context<'_>) -> E + Send + Sync, E: Into<Error> + Send,

Source§

type Output = Never

The inner type associated with this endpoint.
Source§

type Task = Abort<E>

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

fn apply(&self, cx: &mut Context<'_>) -> Option<Self::Task>

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

fn apply_request( &self, input: &Input, body: RequestBody, ) -> ApplyRequest<Self::Task>

Create an asyncrhonous computation from a request.
Source§

impl<F: Copy> Copy for Abort<F>

Auto Trait Implementations§

§

impl<F> Freeze for Abort<F>
where F: Freeze,

§

impl<F> RefUnwindSafe for Abort<F>
where F: RefUnwindSafe,

§

impl<F> Send for Abort<F>
where F: Send,

§

impl<F> Sync for Abort<F>
where F: Sync,

§

impl<F> Unpin for Abort<F>
where F: Unpin,

§

impl<F> UnwindSafe for Abort<F>
where F: 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<E> EndpointExt for E
where E: Endpoint,

Source§

fn as_t<T>(self) -> Self
where Self: Endpoint<Output = T>,

Annotate that the associated type Output is equal to T.
Source§

fn and<E>(self, e: E) -> And<Self, E::Endpoint>
where E: IntoEndpoint, Self::Output: Send, E::Output: Send,

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

fn left<E>(self, e: E) -> Left<Self, E::Endpoint>
where E: IntoEndpoint,

Create an endpoint which evaluates self and e and returns the task of self if matched.
Source§

fn right<E>(self, e: E) -> Right<Self, E::Endpoint>
where E: IntoEndpoint,

Create an endpoint which evaluates self and e and returns the task of e if matched.
Source§

fn or<E>(self, e: E) -> Or<Self, E::Endpoint>
where E: IntoEndpoint<Output = Self::Output>,

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

fn lift(self) -> Lift<Self>

Create an endpoint which returns None if the inner endpoint skips the request.
Source§

fn map<F, U>(self, f: F) -> Map<Self, F>
where F: FnOnce(Self::Output) -> U + Clone + Send + Sync,

Create an endpoint which maps the returned value to a different type.
Source§

fn inspect<F>(self, f: F) -> Inspect<Self, F>
where F: FnOnce(&Self::Output) + Clone + Send + Sync,

Create an endpoint which do something with the output value from self.
Source§

fn map_async<F, T>(self, f: F) -> MapAsync<Self, F>
where F: FnOnce(Self::Output) -> T + Clone + Send + Sync, T: IntoTask, T::Task: Send,

Create an endpoint which continue an asynchronous computation from the value returned from self.
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<E> IntoEndpoint for E
where E: Endpoint,

Source§

type Output = <E as Endpoint>::Output

The inner type of associated Endpoint.
Source§

type Endpoint = E

The type of transformed Endpoint.
Source§

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

Consume itself and transform into an Endpoint.
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 = 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.