Struct ntex_mqtt::v3::client::ClientRouter
source · pub struct ClientRouter<Err, PErr> { /* private fields */ }
Expand description
Mqtt client with routing capabilities
Implementations§
source§impl<Err, PErr> ClientRouter<Err, PErr>where
Err: From<PErr> + 'static,
PErr: 'static,
impl<Err, PErr> ClientRouter<Err, PErr>where
Err: From<PErr> + 'static,
PErr: 'static,
sourcepub fn resource<T, F, S>(self, address: T, service: F) -> Selfwhere
T: IntoPattern,
F: IntoService<S, Publish>,
S: Service<Publish, Response = (), Error = PErr> + 'static,
pub fn resource<T, F, S>(self, address: T, service: F) -> Selfwhere
T: IntoPattern,
F: IntoService<S, Publish>,
S: Service<Publish, Response = (), Error = PErr> + '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
sourcepub async fn start<F, S>(self, service: F) -> Result<(), MqttError<Err>>where
F: IntoService<S, ControlMessage<Err>>,
S: Service<ControlMessage<Err>, Response = ControlResult, Error = Err> + 'static,
pub async fn start<F, S>(self, service: F) -> Result<(), MqttError<Err>>where
F: IntoService<S, ControlMessage<Err>>,
S: Service<ControlMessage<Err>, Response = ControlResult, Error = Err> + 'static,
Run client and handle control messages