Struct ntex_mqtt::v3::client::MqttConnector [−][src]
pub struct MqttConnector<A, T> { /* fields omitted */ }
Expand description
Mqtt client connector
Implementations
impl<A> MqttConnector<A, ()> where
A: Address + Clone,
[src]
impl<A> MqttConnector<A, ()> where
A: Address + Clone,
[src]pub fn new(address: A) -> MqttConnector<A, Connector<A>>
[src]
pub fn new(address: A) -> MqttConnector<A, Connector<A>>
[src]Create new mqtt connector
impl<A, T> MqttConnector<A, T> where
A: Address + Clone,
T: Service<Request = Connect<A>, Error = ConnectError>,
T::Response: AsyncRead + AsyncWrite + Unpin + 'static,
[src]
impl<A, T> MqttConnector<A, T> where
A: Address + Clone,
T: Service<Request = Connect<A>, Error = ConnectError>,
T::Response: AsyncRead + AsyncWrite + Unpin + 'static,
[src]pub fn client_id<U>(self, client_id: U) -> Self where
ByteString: From<U>,
[src]
pub fn client_id<U>(self, client_id: U) -> Self where
ByteString: From<U>,
[src]Create new client and provide client id
pub fn clean_session(self) -> Self
[src]
pub fn clean_session(self) -> Self
[src]The handling of the Session state.
pub fn keep_alive(self, val: u16) -> Self
[src]
pub fn keep_alive(self, val: u16) -> Self
[src]A time interval measured in seconds.
keep-alive is set to 30 seconds by default.
pub fn last_will(self, val: LastWill) -> Self
[src]
pub fn last_will(self, val: LastWill) -> Self
[src]Will Message be stored on the Server and associated with the Network Connection.
by default last will value is not set
pub fn username<U>(self, val: U) -> Self where
ByteString: From<U>,
[src]
pub fn username<U>(self, val: U) -> Self where
ByteString: From<U>,
[src]Username can be used by the Server for authentication and authorization.
pub fn password(self, val: Bytes) -> Self
[src]
pub fn password(self, val: Bytes) -> Self
[src]Password can be used by the Server for authentication and authorization.
pub fn max_send(self, val: u16) -> Self
[src]
pub fn max_send(self, val: u16) -> Self
[src]Set max send packets number
Number of in-flight outgoing publish packets. By default receive max is set to 16 packets. To disable in-flight limit set value to 0.
pub fn max_receive(self, val: u16) -> Self
[src]
pub fn max_receive(self, val: u16) -> Self
[src]Set max receive packets number
Number of in-flight incoming publish packets. By default receive max is set to 16 packets. To disable in-flight limit set value to 0.
pub fn max_packet_size(self, val: u32) -> Self
[src]
pub fn max_packet_size(self, val: u32) -> Self
[src]Max incoming packet size.
To disable max size limit set value to 0.
pub fn handshake_timeout(self, timeout: u16) -> Self
[src]
pub fn handshake_timeout(self, timeout: u16) -> Self
[src]Set handshake timeout in milliseconds.
Handshake includes connect
packet and response connect-ack
.
By default handshake timeuot is disabled.
pub fn disconnect_timeout(self, timeout: u16) -> Self
[src]
pub fn disconnect_timeout(self, timeout: u16) -> Self
[src]Set client connection disconnect timeout in milliseconds.
Defines a timeout for disconnect connection. If a disconnect procedure does not complete within this time, the connection get dropped.
To disable timeout set value to 0.
By default disconnect timeout is set to 3 seconds.
pub fn connector<U>(self, connector: U) -> MqttConnector<A, U> where
U: Service<Request = Connect<A>, Error = ConnectError>,
U::Response: AsyncRead + AsyncWrite + Unpin + 'static,
[src]
pub fn connector<U>(self, connector: U) -> MqttConnector<A, U> where
U: Service<Request = Connect<A>, Error = ConnectError>,
U::Response: AsyncRead + AsyncWrite + Unpin + 'static,
[src]Use custom connector
Auto Trait Implementations
impl<A, T> !RefUnwindSafe for MqttConnector<A, T>
impl<A, T> !Send for MqttConnector<A, T>
impl<A, T> !Sync for MqttConnector<A, T>
impl<A, T> Unpin for MqttConnector<A, T> where
A: Unpin,
T: Unpin,
A: Unpin,
T: Unpin,
impl<A, T> !UnwindSafe for MqttConnector<A, T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self