pub struct CometdClient<Msg> { /* private fields */ }Expand description
A cometd Client.
Implementations§
Source§impl<Msg> CometdClient<Msg>
impl<Msg> CometdClient<Msg>
Sourcepub fn rx(&self) -> CometdEventReceiver<Msg>
pub fn rx(&self) -> CometdEventReceiver<Msg>
Return client event receiver channel.
§Example
let mut event_rx = client.rx();
client.subscribe(&["/topic0"]).await;
while let Some(event) = event_rx.recv().await {
println!("Got cometd client event: `{event:?}`.");
}Trait Implementations§
Auto Trait Implementations§
impl<Msg> Freeze for CometdClient<Msg>
impl<Msg> RefUnwindSafe for CometdClient<Msg>
impl<Msg> Send for CometdClient<Msg>
impl<Msg> Sync for CometdClient<Msg>
impl<Msg> Unpin for CometdClient<Msg>
impl<Msg> UnwindSafe for CometdClient<Msg>
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