pub struct AsyncClientBuilder { /* private fields */ }Expand description
Builder for asynchronous MQTT clients.
The request channel is bounded by default using
MqttOptions::request_channel_capacity. Use Self::capacity to override
the bounded capacity, or Self::unbounded to opt into an unbounded request channel.
Implementations§
Source§impl AsyncClientBuilder
impl AsyncClientBuilder
Sourcepub const fn new(options: MqttOptions) -> Self
pub const fn new(options: MqttOptions) -> Self
Create a new builder for an asynchronous AsyncClient.
Sourcepub const fn capacity(self, cap: usize) -> Self
pub const fn capacity(self, cap: usize) -> Self
Use a bounded request channel with the given capacity.
0 creates a bounded zero-capacity rendezvous channel. Use Self::unbounded
for an unbounded request channel.
Sourcepub fn build(self) -> (AsyncClient, EventLoop)
pub fn build(self) -> (AsyncClient, EventLoop)
Build an asynchronous client and event loop.
This builder always produces the asynchronous client pair so the
terminal build() method matches the entry point that created it.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for AsyncClientBuilder
impl !RefUnwindSafe for AsyncClientBuilder
impl Send for AsyncClientBuilder
impl Sync for AsyncClientBuilder
impl Unpin for AsyncClientBuilder
impl UnsafeUnpin for AsyncClientBuilder
impl !UnwindSafe for AsyncClientBuilder
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