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>where
PhantomData<Payload>: Freeze,
impl<Payload> RefUnwindSafe for IpcClientTypedSubscription<Payload>where
PhantomData<Payload>: RefUnwindSafe,
impl<Payload> Send for IpcClientTypedSubscription<Payload>where
PhantomData<Payload>: Send,
impl<Payload> Sync for IpcClientTypedSubscription<Payload>where
PhantomData<Payload>: Sync,
impl<Payload> Unpin for IpcClientTypedSubscription<Payload>where
PhantomData<Payload>: Unpin,
impl<Payload> UnsafeUnpin for IpcClientTypedSubscription<Payload>where
PhantomData<Payload>: UnsafeUnpin,
impl<Payload> UnwindSafe for IpcClientTypedSubscription<Payload>where
PhantomData<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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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