pub struct GrpcServer<T> { /* private fields */ }Expand description
Grpc server
Implementations§
Source§impl<T> GrpcServer<T>
impl<T> GrpcServer<T>
Source§impl<T> GrpcServer<T>where
T: ServiceFactory<ServerRequest, SharedCfg, Response = ServerResponse, Error = ServerError>,
T::Service: Clone,
impl<T> GrpcServer<T>where
T: ServiceFactory<ServerRequest, SharedCfg, Response = ServerResponse, Error = ServerError>,
T::Service: Clone,
Sourcepub fn make_server(&self, cfg: SharedCfg) -> GrpcService<T>
pub fn make_server(&self, cfg: SharedCfg) -> GrpcService<T>
Create default server
Trait Implementations§
Source§type Error = <T as ServiceFactory<ServerRequest, SharedCfg>>::InitError
type Error = <T as ServiceFactory<ServerRequest, SharedCfg>>::InitError
Errors produced by the created services.
Source§type Service = GrpcService<T>
type Service = GrpcService<T>
The type of
Service produced by this factory.Source§async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
async fn create(&self, cfg: SharedCfg) -> Result<Self::Service, Self::InitError>
Creates a new service asynchronously and returns it.
Source§async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
async fn pipeline(
&self,
cfg: Cfg,
) -> Result<Pipeline<Self::Service>, Self::InitError>where
Self: Sized,
Asynchronously creates a new service and wraps it in a container.
Source§fn map<F, Res>(
self,
f: F,
) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
fn map<F, Res>( self, f: F, ) -> ServiceChainFactory<MapFactory<Self, F, Req, Res, Cfg>, Req, Cfg>
Returns a new service that maps this service’s output to a different type.
Source§fn map_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapErrFactory<Self, Req, Cfg, F, E>, Req, Cfg>
Transforms this service’s error into another error,
producing a new service.
Source§fn map_init_err<F, E>(
self,
f: F,
) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
fn map_init_err<F, E>( self, f: F, ) -> ServiceChainFactory<MapInitErr<Self, Req, Cfg, F, E>, Req, Cfg>
Maps this factory’s initialization error to a different error,
returning a new service factory.
Auto Trait Implementations§
impl<T> Freeze for GrpcServer<T>
impl<T> RefUnwindSafe for GrpcServer<T>where
T: RefUnwindSafe,
impl<T> !Send for GrpcServer<T>
impl<T> !Sync for GrpcServer<T>
impl<T> Unpin for GrpcServer<T>
impl<T> UnsafeUnpin for GrpcServer<T>
impl<T> UnwindSafe for GrpcServer<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for Twhere
T: ServiceFactory<Req, Cfg>,
impl<T, Req, Cfg> IntoServiceFactory<T, Req, Cfg> for Twhere
T: ServiceFactory<Req, Cfg>,
Source§fn into_factory(self) -> T
fn into_factory(self) -> T
Convert
Self to a ServiceFactory