pub struct RunningService<R: ServiceRole, S: Service<R>> { /* private fields */ }
Available on crate features
client
or server
only.Implementations§
Source§impl<R: ServiceRole, S: Service<R>> RunningService<R, S>
impl<R: ServiceRole, S: Service<R>> RunningService<R, S>
pub fn peer(&self) -> &Peer<R>
pub fn service(&self) -> &S
pub fn cancellation_token(&self) -> RunningServiceCancellationToken
pub async fn waiting(self) -> Result<QuitReason, JoinError>
pub async fn cancel(self) -> Result<QuitReason, JoinError>
Methods from Deref<Target = Peer<R>>§
pub async fn send_notification( &self, notification: R::Not, ) -> Result<(), ServiceError>
pub async fn send_request( &self, request: R::Req, ) -> Result<R::PeerResp, ServiceError>
pub async fn send_cancellable_request( &self, request: R::Req, options: PeerRequestOptions, ) -> Result<RequestHandle<R>, ServiceError>
pub async fn send_request_with_option( &self, request: R::Req, options: PeerRequestOptions, ) -> Result<RequestHandle<R>, ServiceError>
pub fn peer_info(&self) -> Option<&R::PeerInfo>
pub fn set_peer_info(&self, info: R::PeerInfo)
pub fn is_transport_closed(&self) -> bool
Trait Implementations§
Source§impl<R: Debug + ServiceRole, S: Debug + Service<R>> Debug for RunningService<R, S>
impl<R: Debug + ServiceRole, S: Debug + Service<R>> Debug for RunningService<R, S>
Auto Trait Implementations§
impl<R, S> Freeze for RunningService<R, S>
impl<R, S> !RefUnwindSafe for RunningService<R, S>
impl<R, S> Send for RunningService<R, S>
impl<R, S> Sync for RunningService<R, S>
impl<R, S> Unpin for RunningService<R, S>
impl<R, S> !UnwindSafe for RunningService<R, S>
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