pub struct IpcClientSubscription {
pub(crate) receiver: Receiver<IncomingMessage>,
pub(crate) topic: Option<String>,
}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.
Fields§
§receiver: Receiver<IncomingMessage>§topic: Option<String>Implementations§
Source§impl IpcClientSubscription
impl IpcClientSubscription
Sourcepub async fn receive(
&mut self,
cancellation_token: Option<CancellationToken>,
) -> Result<IncomingMessage, ReceiveError>
pub async fn receive( &mut self, cancellation_token: Option<CancellationToken>, ) -> Result<IncomingMessage, ReceiveError>
Receive a message, optionally filtering by topic.
Setting the cancellation_token to None will wait indefinitely.
Auto Trait Implementations§
impl Freeze for IpcClientSubscription
impl RefUnwindSafe for IpcClientSubscription
impl Send for IpcClientSubscription
impl Sync for IpcClientSubscription
impl Unpin for IpcClientSubscription
impl UnsafeUnpin for IpcClientSubscription
impl UnwindSafe for IpcClientSubscription
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