ServiceExt

Trait ServiceExt 

Source
pub trait ServiceExt<I: Send>: Service<I> {
    // Provided methods
    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 { ... }
    fn flow_inspect<O, E, F>(self, f: F) -> (Self, Inspect<O, E, F>)
       where Self: Sized + Service<I, Out = Result<O, E>> + Send,
             F: Fn(&O) + Send,
             O: Send,
             E: Send { ... }
    fn spawn_each(self) -> SpawnEach<I, Self>
       where Self: Sized + Send + Clone,
             Self::Out: Send { ... }
    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 { ... }
    fn flow_map<O1, O2, E1, F, H>(self, f: F) -> (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 { ... }
    fn flow_filter_map<O1, O2, E1, F, H>(self, f: F) -> (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 { ... }
}

Provided Methods§

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 flow_inspect<O, E, F>(self, f: F) -> (Self, Inspect<O, E, F>)
where Self: Sized + Service<I, Out = Result<O, E>> + Send, F: Fn(&O) + Send, O: Send, E: Send,

Source

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

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,

Source

fn flow_map<O1, O2, E1, F, H>(self, f: F) -> (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) -> (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,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I: Send, T: Service<I>> ServiceExt<I> for T