pub struct IpcClientSubscription {
receiver: Receiver<IncomingMessage>,
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 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