[][src]Struct blip::overlay::GrpcService

pub struct GrpcService<S> { /* fields omitted */ }

A wrapper around an arbitrary Service that will implement MeshService for free.

This can be used to serve a service that isn't mesh-aware.

Methods

impl<S: Service<HttpRequest<Body>>> GrpcService<S>[src]

pub fn new(svc: S) -> Self[src]

Wrap a type that implements Service.

Trait Implementations

impl<S: Clone> Clone for GrpcService<S>[src]

impl<S: Copy> Copy for GrpcService<S>[src]

impl<S: Debug> Debug for GrpcService<S>[src]

impl<S: Send> MeshService for GrpcService<S>[src]

impl<S: NamedService> NamedService for GrpcService<S>[src]

impl<Request, S: Service<Request>> Service<Request> for GrpcService<S>[src]

type Response = S::Response

Responses given by the service.

type Error = S::Error

Errors produced by the service.

type Future = S::Future

The future response value.

Auto Trait Implementations

impl<S> RefUnwindSafe for GrpcService<S> where
    S: RefUnwindSafe

impl<S> Send for GrpcService<S> where
    S: Send

impl<S> Sync for GrpcService<S> where
    S: Sync

impl<S> Unpin for GrpcService<S> where
    S: Unpin

impl<S> UnwindSafe for GrpcService<S> where
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, M1, M2> ClientStreamingService<M1> for T where
    T: Service<Request<Streaming<M1>>, Response = Response<M2>, Error = Status>, 
[src]

type Response = M2

Protobuf response message type

type Future = <T as Service<Request<Streaming<M1>>>>::Future

Response future

impl<S, T> Connect for S where
    S: Service<Uri, Response = T> + Send + 'static,
    T: AsyncRead + AsyncWrite + Connection + Unpin + Send + 'static,
    <S as Service<Uri>>::Error: Into<Box<dyn Error + 'static + Sync + Send>>,
    <S as Service<Uri>>::Future: Unpin,
    <S as Service<Uri>>::Future: Send
[src]

type _Svc = S

impl<T> From<T> for T[src]

impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T where
    ResBody: Body + Body,
    T: Service<Request<ReqBody>, Response = Response<ResBody>>,
    <T as Service<Request<ReqBody>>>::Error: Into<Box<dyn Error + 'static + Sync + Send>>,
    <ResBody as Body>::Error: Into<Box<dyn Error + 'static + Sync + Send>>, 
[src]

type ResponseBody = ResBody

Responses body given by the service.

type Error = <T as Service<Request<ReqBody>>>::Error

Errors produced by the service.

type Future = <T as Service<Request<ReqBody>>>::Future

The future response value.

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<C, Target> MakeConnection<Target> for C where
    C: Service<Target>,
    <C as Service<Target>>::Response: AsyncRead,
    <C as Service<Target>>::Response: AsyncWrite
[src]

type Connection = <C as Service<Target>>::Response

The transport provided by this service

type Error = <C as Service<Target>>::Error

Errors produced by the connecting service

type Future = <C as Service<Target>>::Future

The future that eventually produces the transport

impl<M, S, Target, Request> MakeService<Target, Request> for M where
    M: Service<Target, Response = S>,
    S: Service<Request>, 
[src]

type Response = <S as Service<Request>>::Response

Responses given by the service

type Error = <S as Service<Request>>::Error

Errors produced by the service

type Service = S

The Service value created by this factory

type MakeError = <M as Service<Target>>::Error

Errors produced while building a service.

type Future = <M as Service<Target>>::Future

The future of the Service instance.

impl<T, S, M1, M2> ServerStreamingService<M1> for T where
    S: Stream<Item = Result<M2, Status>>,
    T: Service<Request<M1>, Response = Response<S>, Error = Status>, 
[src]

type Response = M2

Protobuf response message type

type ResponseStream = S

Stream of outbound response messages

type Future = <T as Service<Request<M1>>>::Future

Response future

impl<T, Request> ServiceExt<Request> for T where
    T: Service<Request> + ?Sized
[src]

impl<T, S, M1, M2> StreamingService<M1> for T where
    S: Stream<Item = Result<M2, Status>>,
    T: Service<Request<Streaming<M1>>, Response = Response<S>, Error = Status>, 
[src]

type Response = M2

Protobuf response message type

type ResponseStream = S

Stream of outbound response messages

type Future = <T as Service<Request<Streaming<M1>>>>::Future

Response future

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, M1, M2> UnaryService<M1> for T where
    T: Service<Request<M1>, Response = Response<M2>, Error = Status>, 
[src]

type Response = M2

Protobuf response message type

type Future = <T as Service<Request<M1>>>::Future

Response future

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]