pub struct TowerHandler<S, R: ServiceRole> {
pub service: S,
pub info: R::Info,
/* private fields */
}Available on crate feature
tower and (crate features client or server) only.Fields§
§service: S§info: R::InfoImplementations§
Source§impl<S, R: ServiceRole> TowerHandler<S, R>
impl<S, R: ServiceRole> TowerHandler<S, R>
Trait Implementations§
Source§impl<S, R: ServiceRole> Service<R> for TowerHandler<S, R>
impl<S, R: ServiceRole> Service<R> for TowerHandler<S, R>
Source§async fn handle_request(
&self,
request: R::PeerReq,
_context: RequestContext<R>,
) -> Result<R::Resp, ErrorData>
async fn handle_request( &self, request: R::PeerReq, _context: RequestContext<R>, ) -> Result<R::Resp, ErrorData>
Available on non-crate feature
local only.Source§fn handle_notification(
&self,
_notification: R::PeerNot,
_context: NotificationContext<R>,
) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture + '_
fn handle_notification( &self, _notification: R::PeerNot, _context: NotificationContext<R>, ) -> impl Future<Output = Result<(), ErrorData>> + MaybeSendFuture + '_
Available on non-crate feature
local only.Auto Trait Implementations§
impl<S, R> Freeze for TowerHandler<S, R>
impl<S, R> RefUnwindSafe for TowerHandler<S, R>
impl<S, R> Send for TowerHandler<S, R>where
S: Send,
impl<S, R> Sync for TowerHandler<S, R>where
S: Sync,
impl<S, R> Unpin for TowerHandler<S, R>
impl<S, R> UnsafeUnpin for TowerHandler<S, R>
impl<S, R> UnwindSafe for TowerHandler<S, R>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
impl<R, S> DynService<R> for Swhere
R: ServiceRole,
S: Service<R>,
Source§fn handle_request(
&self,
request: <R as ServiceRole>::PeerReq,
context: RequestContext<R>,
) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
fn handle_request( &self, request: <R as ServiceRole>::PeerReq, context: RequestContext<R>, ) -> Pin<Box<dyn Future<Output = Result<<R as ServiceRole>::Resp, ErrorData>> + Send + '_>>
Available on (crate features
client or server) and non-crate feature local only.Source§fn handle_notification(
&self,
notification: <R as ServiceRole>::PeerNot,
context: NotificationContext<R>,
) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
fn handle_notification( &self, notification: <R as ServiceRole>::PeerNot, context: NotificationContext<R>, ) -> Pin<Box<dyn Future<Output = Result<(), ErrorData>> + Send + '_>>
Available on (crate features
client or server) and non-crate feature local only.Source§fn get_info(&self) -> <R as ServiceRole>::Info
fn get_info(&self) -> <R as ServiceRole>::Info
Available on (crate features
client or server) and non-crate feature local only.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<S> ServiceExt<RoleClient> for Swhere
S: Service<RoleClient>,
impl<S> ServiceExt<RoleClient> for Swhere
S: Service<RoleClient>,
Source§fn serve_with_ct<T, E, A>(
self,
transport: T,
ct: CancellationToken,
) -> impl Future<Output = Result<RunningService<RoleClient, S>, ClientInitializeError>> + MaybeSendFuture
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleClient, S>, ClientInitializeError>> + MaybeSendFuture
Available on crate features
client or server only.Source§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
Available on crate features
client or server only.Convert this service to a dynamic boxed service Read more
Source§fn serve<T, E, A>(
self,
transport: T,
) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + MaybeSendFuture
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + MaybeSendFuture
Available on crate features
client or server only.Source§impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
impl<S> ServiceExt<RoleServer> for Swhere
S: Service<RoleServer>,
Source§fn serve_with_ct<T, E, A>(
self,
transport: T,
ct: CancellationToken,
) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
fn serve_with_ct<T, E, A>( self, transport: T, ct: CancellationToken, ) -> impl Future<Output = Result<RunningService<RoleServer, S>, ServerInitializeError>> + MaybeSendFuture
Available on crate features
client or server only.Source§fn into_dyn(self) -> Box<dyn DynService<R>>
fn into_dyn(self) -> Box<dyn DynService<R>>
Available on crate features
client or server only.Convert this service to a dynamic boxed service Read more
Source§fn serve<T, E, A>(
self,
transport: T,
) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + MaybeSendFuture
fn serve<T, E, A>( self, transport: T, ) -> impl Future<Output = Result<RunningService<R, Self>, R::InitializeError>> + MaybeSendFuture
Available on crate features
client or server only.