pub struct IpcClientTypedSubscription<Payload: DeserializeOwned + PayloadTypeName>(IpcClientSubscription, PhantomData<Payload>);
Expand description
A subscription to receive messages over IPC. The subcription will start buffering messages after its creation and return them when receive() is called. Messages received before the subscription was created will not be returned.
Tuple Fields§
§0: IpcClientSubscription
§1: PhantomData<Payload>
Implementations§
Source§impl<Payload> IpcClientTypedSubscription<Payload>where
Payload: DeserializeOwned + PayloadTypeName,
impl<Payload> IpcClientTypedSubscription<Payload>where
Payload: DeserializeOwned + PayloadTypeName,
Sourcepub async fn receive(
&mut self,
cancellation_token: Option<CancellationToken>,
) -> Result<TypedIncomingMessage<Payload>, TypedReceiveError>
pub async fn receive( &mut self, cancellation_token: Option<CancellationToken>, ) -> Result<TypedIncomingMessage<Payload>, TypedReceiveError>
Receive a message.
Setting the cancellation_token to None
will wait indefinitely.
Auto Trait Implementations§
impl<Payload> Freeze for IpcClientTypedSubscription<Payload>
impl<Payload> RefUnwindSafe for IpcClientTypedSubscription<Payload>where
Payload: RefUnwindSafe,
impl<Payload> Send for IpcClientTypedSubscription<Payload>where
Payload: Send,
impl<Payload> Sync for IpcClientTypedSubscription<Payload>where
Payload: Sync,
impl<Payload> Unpin for IpcClientTypedSubscription<Payload>where
Payload: Unpin,
impl<Payload> UnwindSafe for IpcClientTypedSubscription<Payload>where
Payload: 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