[][src]Struct actix_mqtt::client::Client

pub struct Client<Io, St> { /* fields omitted */ }

Mqtt client

Methods

impl<Io, St> Client<Io, St> where
    St: 'static, 
[src]

pub fn new(client_id: String<Bytes>) -> Self[src]

Create new client and provide client id

pub fn protocol(self, val: Protocol) -> Self[src]

Mqtt protocol version

pub fn clean_session(self, val: bool) -> Self[src]

The handling of the Session state.

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]

Will Message be stored on the Server and associated with the Network Connection.

by default last will value is not set

pub fn username(self, val: String<Bytes>) -> Self[src]

Username can be used by the Server for authentication and authorization.

pub fn password(self, val: Bytes) -> Self[src]

Password can be used by the Server for authentication and authorization.

pub fn inflight(self, val: usize) -> Self[src]

Number of in-flight concurrent messages.

in-flight is set to 15 messages

pub fn state<C, F>(self, state: F) -> ServiceBuilder<Io, St, C> where
    F: IntoService<C>,
    Io: AsyncRead + AsyncWrite,
    C: Service<Request = ConnectAck<Io>, Response = ConnectAckResult<Io, St>>,
    C::Error: 'static, 
[src]

Set state service

State service verifies connect ack packet and construct connection state.

Trait Implementations

impl<Io: Clone, St: Clone> Clone for Client<Io, St>[src]

Auto Trait Implementations

impl<Io, St> Send for Client<Io, St> where
    Io: Send,
    St: Send

impl<Io, St> Unpin for Client<Io, St> where
    Io: Unpin,
    St: Unpin

impl<Io, St> Sync for Client<Io, St> where
    Io: Sync,
    St: Sync

impl<Io, St> UnwindSafe for Client<Io, St> where
    Io: UnwindSafe,
    St: UnwindSafe

impl<Io, St> RefUnwindSafe for Client<Io, St> where
    Io: RefUnwindSafe,
    St: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T