pub struct Client<C, CM, SM>where
C: Cancellable,{ /* private fields */ }Expand description
Receiving half of the peer’s connection.
Trait Implementations§
Source§impl<C, CM, SM> Cancellable for Client<C, CM, SM>
impl<C, CM, SM> Cancellable for Client<C, CM, SM>
Source§type Handle = ClientHandle<C, SM>
type Handle = ClientHandle<C, SM>
Type of a handle for communicating with the service.
Source§type Error = ClientError
type Error = ClientError
Error returned by
Self::run method.Source§fn new_handle<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Self::Handle> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn new_handle<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Self::Handle> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Constructs a new handle for communicating with the service. Read more
Source§fn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<CancellationResult<Self::Result>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<CancellationResult<Self::Result>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Performs a single unit of work. Read more
Source§fn spawn<'async_trait>(
self,
cancellation_token: CancellationToken,
) -> Pin<Box<dyn Future<Output = CancellableHandle<Self>> + Send + 'async_trait>>
fn spawn<'async_trait>( self, cancellation_token: CancellationToken, ) -> Pin<Box<dyn Future<Output = CancellableHandle<Self>> + Send + 'async_trait>>
Consumes the service and spawns its work loop. Read more
Source§fn spawn_with_callback<'async_trait, F>(
self,
cancellation_token: CancellationToken,
callback: F,
) -> Pin<Box<dyn Future<Output = CancellableHandle<Self>> + Send + 'async_trait>>
fn spawn_with_callback<'async_trait, F>( self, cancellation_token: CancellationToken, callback: F, ) -> Pin<Box<dyn Future<Output = CancellableHandle<Self>> + Send + 'async_trait>>
Consumes the service and spawns its work loop. Read more
Auto Trait Implementations§
impl<C, CM, SM> Freeze for Client<C, CM, SM>
impl<C, CM, SM> !RefUnwindSafe for Client<C, CM, SM>
impl<C, CM, SM> Send for Client<C, CM, SM>
impl<C, CM, SM> Sync for Client<C, CM, SM>
impl<C, CM, SM> Unpin for Client<C, CM, SM>
impl<C, CM, SM> !UnwindSafe for Client<C, CM, SM>
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