pub struct Client { /* private fields */ }
Expand description
Mqtt client
Implementations§
source§impl Client
impl Client
sourcepub fn session_present(&self) -> bool
pub fn session_present(&self) -> bool
Indicates whether there is already stored Session state
sourcepub fn resource<T, F, U>(
self,
address: T,
service: F
) -> ClientRouter<U::Error, U::Error>where
T: IntoPattern,
F: IntoService<U, Publish>,
U: Service<Publish, Response = ()> + 'static,
pub fn resource<T, F, U>(
self,
address: T,
service: F
) -> ClientRouter<U::Error, U::Error>where
T: IntoPattern,
F: IntoService<U, Publish>,
U: Service<Publish, Response = ()> + 'static,
Configure mqtt resource for a specific topic
sourcepub async fn start_default(self)
pub async fn start_default(self)
Run client with default control messages handler.
Default handler closes connection on any control message.
sourcepub async fn start<F, S, E>(self, service: F) -> Result<(), MqttError<E>>where
E: 'static,
F: IntoService<S, ControlMessage<E>> + 'static,
S: Service<ControlMessage<E>, Response = ControlResult, Error = E> + 'static,
pub async fn start<F, S, E>(self, service: F) -> Result<(), MqttError<E>>where
E: 'static,
F: IntoService<S, ControlMessage<E>> + 'static,
S: Service<ControlMessage<E>, Response = ControlResult, Error = E> + 'static,
Run client with provided control messages handler
sourcepub fn into_inner(self) -> (IoBoxed, Codec)
pub fn into_inner(self) -> (IoBoxed, Codec)
Get negotiated io stream and codec