pub struct AsyncClient<U, W>(/* private fields */);

Implementations§

source§

impl<U, W> AsyncClient<U, W>

source

pub const fn new(unblocker: U, client: W) -> Self

source§

impl<E> AsyncClient<(), Blocking<E, Enqueueing>>
where E: Enqueue + Send,

source

pub async fn publish<'a>( &'a mut self, topic: &'a str, qos: QoS, retain: bool, payload: &'a [u8] ) -> Result<MessageId, E::Error>

source§

impl<P> AsyncClient<(), Blocking<P, Publishing>>
where P: Publish + Send,

source

pub async fn publish<'a>( &'a mut self, topic: &'a str, qos: QoS, retain: bool, payload: &'a [u8] ) -> Result<MessageId, P::Error>

source§

impl<C, P> AsyncClient<(), Blocking<C, P>>
where C: Client + Send,

source

pub async fn subscribe<'a>( &'a mut self, topic: &'a str, qos: QoS ) -> Result<MessageId, C::Error>

source

pub async fn unsubscribe<'a>( &'a mut self, topic: &'a str ) -> Result<MessageId, C::Error>

source§

impl<C> AsyncClient<(), Blocking<C, Publishing>>

source§

impl<C> AsyncClient<(), Blocking<C, Enqueueing>>

Trait Implementations§

source§

impl<C> AsyncWrapper<C> for AsyncClient<(), Blocking<C, Publishing>>

source§

fn new(sync: C) -> Self

source§

impl<U, R, C> UnblockingAsyncWrapper<U, C> for AsyncClient<U, Arc<Mutex<R, C>>>
where R: RawMutex,

source§

fn new(unblocker: U, sync: C) -> Self

Auto Trait Implementations§

§

impl<U, W> RefUnwindSafe for AsyncClient<U, W>

§

impl<U, W> Send for AsyncClient<U, W>
where U: Send, W: Send,

§

impl<U, W> Sync for AsyncClient<U, W>
where U: Sync, W: Sync,

§

impl<U, W> Unpin for AsyncClient<U, W>
where U: Unpin, W: Unpin,

§

impl<U, W> UnwindSafe for AsyncClient<U, W>
where U: UnwindSafe, W: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.