Struct ntex_mqtt::v5::client::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
Mqtt client
Implementations
Indicates whether there is already stored Session state
Get reference to ConnectAck
packet
Get mutable reference to ConnectAck
packet
pub fn resource<T, F, U, E>(
self,
address: T,
service: F
) -> ClientRouter<E, U::Error> where
T: IntoPattern,
F: IntoService<U, Publish>,
U: Service<Publish, Response = PublishAck> + 'static,
E: From<U::Error>,
PublishAck: TryFrom<U::Error, Error = E>,
pub fn resource<T, F, U, E>(
self,
address: T,
service: F
) -> ClientRouter<E, U::Error> where
T: IntoPattern,
F: IntoService<U, Publish>,
U: Service<Publish, Response = PublishAck> + 'static,
E: From<U::Error>,
PublishAck: TryFrom<U::Error, Error = E>,
Configure mqtt resource for a specific topic
Run client with default control messages handler.
Default handler closes connection on any control message.
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,
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
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !UnwindSafe for Client
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more