pub struct Handle { /* private fields */ }
Implementations§
Source§impl Handle
impl Handle
pub async fn subscribe(&self) -> Result<Receiver<Payload>>
Sourcepub async fn subscribe_under<S: Into<String>>(
&self,
topic: S,
) -> Result<Receiver<Payload>>
pub async fn subscribe_under<S: Into<String>>( &self, topic: S, ) -> Result<Receiver<Payload>>
subscribe_under is a convenience method for subscribing to a topic underneath our topic prefix
pub async fn publish<B: Into<Bytes>>(&self, payload: B) -> Result<()>
Sourcepub async fn publish_under<S: Into<String>, B: Into<Bytes>>(
&self,
topic: S,
payload: B,
) -> Result<()>
pub async fn publish_under<S: Into<String>, B: Into<Bytes>>( &self, topic: S, payload: B, ) -> Result<()>
publish_under is a convenience method for publishing to a topic underneath our topic prefix
pub async fn shutdown(self) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Handle
impl RefUnwindSafe for Handle
impl Send for Handle
impl Sync for Handle
impl Unpin for Handle
impl UnwindSafe for Handle
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