pub struct Connector2<T>(/* private fields */);Expand description
Basic tcp stream connector
Implementations§
Source§impl<T> Connector2<T>
impl<T> Connector2<T>
Trait Implementations§
Source§impl<T: Clone> Clone for Connector2<T>
impl<T: Clone> Clone for Connector2<T>
Source§fn clone(&self) -> Connector2<T>
fn clone(&self) -> Connector2<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<T: Copy> Copy for Connector2<T>
Source§impl<T: Debug> Debug for Connector2<T>
impl<T: Debug> Debug for Connector2<T>
Source§impl<T> Default for Connector2<T>
impl<T> Default for Connector2<T>
Source§type Error = Error<ConnectError>
type Error = Error<ConnectError>
Errors produced by the created services.
Source§type Service = ConnectorService2<T>
type Service = ConnectorService2<T>
The type of
Service produced by this factory.Source§type InitError = ConnectServiceError
type InitError = ConnectServiceError
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<T> Freeze for Connector2<T>
impl<T> RefUnwindSafe for Connector2<T>where
T: RefUnwindSafe,
impl<T> Send for Connector2<T>where
T: Send,
impl<T> Sync for Connector2<T>where
T: Sync,
impl<T> Unpin for Connector2<T>where
T: Unpin,
impl<T> UnsafeUnpin for Connector2<T>
impl<T> UnwindSafe for Connector2<T>where
T: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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