pub trait Plugin<Protocol, Op, S, L> {
    type Service;
    type Layer;

    // Required method
    fn map(
        &self,
        input: Operation<S, L>
    ) -> Operation<Self::Service, Self::Layer>;
}
Expand description

A mapping from one Operation to another. Used to modify the behavior of Upgradable and therefore the resulting service builder.

The generics Protocol and Op allow the behavior to be parameterized.

See module documentation for more information.

Required Associated Types§

source

type Service

The type of the new Service.

source

type Layer

The type of the new Layer.

Required Methods§

source

fn map(&self, input: Operation<S, L>) -> Operation<Self::Service, Self::Layer>

Maps an Operation to another.

Implementations on Foreign Types§

source§

impl<'a, P, Op, S, L, Pl> Plugin<P, Op, S, L> for &'a Plwhere Pl: Plugin<P, Op, S, L>,

§

type Service = <Pl as Plugin<P, Op, S, L>>::Service

§

type Layer = <Pl as Plugin<P, Op, S, L>>::Layer

source§

fn map(&self, input: Operation<S, L>) -> Operation<Self::Service, Self::Layer>

Implementors§

source§

impl<P, Op, S, ExistingLayer, NewLayer> Plugin<P, Op, S, ExistingLayer> for HttpLayer<NewLayer>where NewLayer: Clone,

§

type Service = S

§

type Layer = Stack<ExistingLayer, NewLayer>

source§

impl<P, Op, S, ExistingLayer, NewLayer, F> Plugin<P, Op, S, ExistingLayer> for OperationNameFn<F>where F: Fn(&'static str) -> NewLayer, Op: OperationShape,

§

type Service = S

§

type Layer = Stack<ExistingLayer, NewLayer>

source§

impl<P, Op, S, L> Plugin<P, Op, S, L> for OperationExtensionPluginwhere Op: OperationShape,

§

type Service = S

§

type Layer = Stack<L, OperationExtensionLayer>

source§

impl<P, Op, S, L> Plugin<P, Op, S, L> for InstrumentPluginwhere Op: OperationShape + Sensitivity,

§

type Service = S

§

type Layer = Stack<L, InstrumentLayer<<Op as Sensitivity>::RequestFmt, <Op as Sensitivity>::ResponseFmt>>

source§

impl<P, Op, S, L> Plugin<P, Op, S, L> for IdentityPlugin

§

type Service = S

§

type Layer = L

source§

impl<P, Op, S, L, Inner, F> Plugin<P, Op, S, L> for FilterByOperationName<Inner, F>where F: Fn(&str) -> bool, Inner: Plugin<P, Op, S, L>, Op: OperationShape,

§

type Service = Either<<Inner as Plugin<P, Op, S, L>>::Service, S>

§

type Layer = Either<<Inner as Plugin<P, Op, S, L>>::Layer, L>

source§

impl<P, Op, S, L, Inner, Outer> Plugin<P, Op, S, L> for PluginStack<Inner, Outer>where Inner: Plugin<P, Op, S, L>, Outer: Plugin<P, Op, Inner::Service, Inner::Layer>,

§

type Service = <Outer as Plugin<P, Op, <Inner as Plugin<P, Op, S, L>>::Service, <Inner as Plugin<P, Op, S, L>>::Layer>>::Service

§

type Layer = <Outer as Plugin<P, Op, <Inner as Plugin<P, Op, S, L>>::Service, <Inner as Plugin<P, Op, S, L>>::Layer>>::Layer

source§

impl<P, Op, S, L, InnerPlugin> Plugin<P, Op, S, L> for PluginPipeline<InnerPlugin>where InnerPlugin: Plugin<P, Op, S, L>,

§

type Service = <InnerPlugin as Plugin<P, Op, S, L>>::Service

§

type Layer = <InnerPlugin as Plugin<P, Op, S, L>>::Layer

source§

impl<P, Op, S, L, Le, Ri> Plugin<P, Op, S, L> for Either<Le, Ri>where Le: Plugin<P, Op, S, L>, Ri: Plugin<P, Op, S, L>,

§

type Service = Either<<Le as Plugin<P, Op, S, L>>::Service, <Ri as Plugin<P, Op, S, L>>::Service>

§

type Layer = Either<<Le as Plugin<P, Op, S, L>>::Layer, <Ri as Plugin<P, Op, S, L>>::Layer>