Struct ntex_mqtt::v5::client::Client [−][src]
pub struct Client<Io> { /* 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<Io, E, U::Error> where
T: IntoPattern,
F: IntoService<U>,
U: Service<Request = 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<Io, E, U::Error> where
T: IntoPattern,
F: IntoService<U>,
U: Service<Request = 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> + 'static,
S: Service<Request = 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> + 'static,
S: Service<Request = ControlMessage<E>, Response = ControlResult, Error = E> + 'static,
Run client with provided control messages handler
Trait Implementations
Auto Trait Implementations
impl<Io> !RefUnwindSafe for Client<Io>
impl<Io> !UnwindSafe for Client<Io>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. 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