Except

Struct Except 

Source
pub struct Except<S, F> { /* private fields */ }

Trait Implementations§

Source§

impl<S: Clone, F: Clone> Clone for Except<S, F>

Source§

fn clone(&self) -> Except<S, 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<I, R, E, E2, F, S> Service<I> for Except<S, F>
where S: Service<I, Out = Result<R, E>>, F: Send + Sync + Fn(E) -> Option<E2>,

Source§

type Out = Result<R, E2>

Source§

fn handle( &mut self, input: I, cx: &Context, ) -> impl Stream<Item = Self::Out> + Send

Source§

fn handle_stream( &mut self, input: impl Stream<Item = In> + Send, cx: &Context, ) -> impl Stream<Item = Self::Out> + Send
where In: Send, Self: Send, Self::Out: Send,

Source§

fn finalize(&mut self, _cx: &Context) -> impl Future<Output = ()>
where Self: Sized,

Auto Trait Implementations§

§

impl<S, F> Freeze for Except<S, F>
where S: Freeze, F: Freeze,

§

impl<S, F> RefUnwindSafe for Except<S, F>

§

impl<S, F> Send for Except<S, F>
where S: Send, F: Send,

§

impl<S, F> Sync for Except<S, F>
where S: Sync, F: Sync,

§

impl<S, F> Unpin for Except<S, F>
where S: Unpin, F: Unpin,

§

impl<S, F> UnwindSafe for Except<S, F>
where S: UnwindSafe, 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<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<I, T> ServiceExt<I> for T
where I: Send, T: Service<I>,

Source§

fn flow<O1, O2, E1, E2, U>(self, service: U) -> (Self, U)
where Self: Sized + Service<I, Out = Result<O1, E1>> + Send, U: Send + Service<O1, Out = Result<O2, E2>>, O1: Send, O2: Send, E1: Send, E2: Send,

Source§

fn except<F>(self, on_err: F) -> Except<Self, F>
where Self: Sized,

Source§

fn flow_inspect<O, E, F>(self, f: F) -> Left<Self, Inspect<O, F>>
where Self: Sized + Service<I, Out = Result<O, E>> + Send, F: Fn(&O) + Send, O: Send,

Adds an inspection step that invokes the supplied callback on every successful output of the wrapped service. Read more
Source§

fn concurrent_each(self, limit: usize) -> ConcurrentEach<I, Self>
where Self: Sized + Send + Clone + 'static, Self::Out: Send,

Creates a concurrent wrapper around the current service that limits the number of parallel executions. Read more
Source§

fn spawn_each(self) -> SpawnEach<I, Self>
where Self: Sized + Send + Clone + 'static, Self::Out: Send,

Creates a new SpawnEach wrapper around the current service. Read more
Source§

fn flow_scope<O, M, E1, S, F>(self, f: F, s: S) -> (Self, Scope<O, M, E1, S, F>)
where F: Fn(&O) -> Result<M, E1>, Self: Sized + Send, O: Send, E1: Send,

Creates a scoped service wrapper that transforms incoming messages before passing to the wrapped service. Read more
Source§

fn flow_scope_each<O, M, E1, S, F>( self, f: F, s: S, ) -> (Self, ScopeEach<O, M, E1, S, F>)
where F: Fn(&O) -> Result<M, E1>, Self: Sized + Send, E1: Send, O: Send + Clone,

Source§

fn flow_map<O1, O2, E1, F, H>(self, f: F) -> Left<Self, Map<O2, F>>
where Self: Sized + Service<I, Out = Result<O1, E1>> + Send, F: FnMut(O1) -> H + Send, H: Future<Output = O2> + Send, O1: Send, O2: Send, E1: Send,

Source§

fn flow_filter_map<O1, O2, E1, F, H>(self, f: F) -> Left<Self, FilterMap<O2, F>>
where Self: Sized + Service<I, Out = Result<O1, E1>> + Send, O1: Send, O2: Send, E1: Send, F: FnMut(O1) -> H + Send, H: Future<Output = Option<O2>> + Send,

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.