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,
pub(crate) fn new(subscription: IpcClientSubscription) -> Self
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> UnsafeUnpin for IpcClientTypedSubscription<Payload>
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more