pub struct Server<St, H, Ctl, Pb> { /* private fields */ }Expand description
Amqp server factory
Implementations§
Source§impl<St> Server<St, (), (), ()>where
St: 'static,
impl<St> Server<St, (), (), ()>where
St: 'static,
Sourcepub fn build<F, H>(
handshake: F,
) -> ServerBuilder<St, H, DefaultControlService<St, H::Error>>where
F: IntoServiceFactory<H, Handshake, SharedCfg>,
H: ServiceFactory<Handshake, SharedCfg, Response = HandshakeAck<St>>,
pub fn build<F, H>(
handshake: F,
) -> ServerBuilder<St, H, DefaultControlService<St, H::Error>>where
F: IntoServiceFactory<H, Handshake, SharedCfg>,
H: ServiceFactory<Handshake, SharedCfg, Response = HandshakeAck<St>>,
Start server building process with provided handshake service
Trait Implementations§
Source§type Error = ServerError<<H as ServiceFactory<Handshake, SharedCfg>>::Error>
type Error = ServerError<<H as ServiceFactory<Handshake, SharedCfg>>::Error>
Errors produced by the created services.
Source§type Service = ServerHandler<St, <H as ServiceFactory<Handshake, SharedCfg>>::Service, Ctl, Pb>
type Service = ServerHandler<St, <H as ServiceFactory<Handshake, SharedCfg>>::Service, Ctl, Pb>
The type of
Service produced by this factory.Source§type InitError = <H as ServiceFactory<Handshake, SharedCfg>>::InitError
type InitError = <H as ServiceFactory<Handshake, SharedCfg>>::InitError
Possible errors encountered during service construction.
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.
Source§type Error = ServerError<<H as ServiceFactory<Handshake, SharedCfg>>::Error>
type Error = ServerError<<H as ServiceFactory<Handshake, SharedCfg>>::Error>
Errors produced by the created services.
Source§type Service = ServerHandler<St, <H as ServiceFactory<Handshake, SharedCfg>>::Service, Ctl, Pb>
type Service = ServerHandler<St, <H as ServiceFactory<Handshake, SharedCfg>>::Service, Ctl, Pb>
The type of
Service produced by this factory.Source§type InitError = <H as ServiceFactory<Handshake, SharedCfg>>::InitError
type InitError = <H as ServiceFactory<Handshake, SharedCfg>>::InitError
Possible errors encountered during service construction.
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<St, H, Ctl, Pb> Freeze for Server<St, H, Ctl, Pb>where
H: Freeze,
impl<St, H, Ctl, Pb> RefUnwindSafe for Server<St, H, Ctl, Pb>
impl<St, H, Ctl, Pb> !Send for Server<St, H, Ctl, Pb>
impl<St, H, Ctl, Pb> !Sync for Server<St, H, Ctl, Pb>
impl<St, H, Ctl, Pb> Unpin for Server<St, H, Ctl, Pb>where
H: Unpin,
impl<St, H, Ctl, Pb> UnsafeUnpin for Server<St, H, Ctl, Pb>where
H: UnsafeUnpin,
impl<St, H, Ctl, Pb> UnwindSafe for Server<St, H, Ctl, Pb>
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