MakeMultiplexer

Struct MakeMultiplexer 

Source
pub struct MakeMultiplexer<MakeGrpc, MakeWeb> { /* private fields */ }
Expand description

A MakeService for Multiplexer

This type is used when more than one Multiplexer instance is needed

Implementations§

Source§

impl<MakeGrpc, MakeWeb> MakeMultiplexer<MakeGrpc, MakeWeb>

Source

pub fn new(make_grpc: MakeGrpc, make_web: MakeWeb) -> Self

Move two make services into a new MakeService for Multiplexer

Trait Implementations§

Source§

impl<Grpc, Web, GrpcError, WebError, MakeGrpc, MakeWeb, Target> Service<Target> for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: Service<Target, Response = Grpc, Error = GrpcError>, MakeWeb: Service<Target, Response = Web, Error = WebError>, Grpc: Service<Request<Body>>, Web: Service<Request<Body>>, GrpcError: Into<Box<dyn Error + Send + Sync + 'static>>, WebError: Into<Box<dyn Error + Send + Sync + 'static>>, Target: Clone,

Source§

type Response = Multiplexer<Grpc, Web>

Responses given by the service.
Source§

type Error = Box<dyn Error + Sync + Send>

Errors produced by the service.
Source§

type Future = MakeMultiplexerFuture<<MakeGrpc as Service<Target>>::Future, <MakeWeb as Service<Target>>::Future>

The future response value.
Source§

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

Returns Poll::Ready(Ok(())) when the service is able to process requests. Read more
Source§

fn call(&mut self, req: Target) -> Self::Future

Process the request and return the response asynchronously. Read more

Auto Trait Implementations§

§

impl<MakeGrpc, MakeWeb> Freeze for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: Freeze, MakeWeb: Freeze,

§

impl<MakeGrpc, MakeWeb> RefUnwindSafe for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: RefUnwindSafe, MakeWeb: RefUnwindSafe,

§

impl<MakeGrpc, MakeWeb> Send for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: Send, MakeWeb: Send,

§

impl<MakeGrpc, MakeWeb> Sync for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: Sync, MakeWeb: Sync,

§

impl<MakeGrpc, MakeWeb> Unpin for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: Unpin, MakeWeb: Unpin,

§

impl<MakeGrpc, MakeWeb> UnwindSafe for MakeMultiplexer<MakeGrpc, MakeWeb>
where MakeGrpc: UnwindSafe, MakeWeb: 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> 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, 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.