Struct ntex_mqtt::v5::client::ClientRouter
source · pub struct ClientRouter<Err, PErr> { /* private fields */ }
Expand description
Mqtt client with routing capabilities
Implementations
sourceimpl<Err, PErr> ClientRouter<Err, PErr>where
Err: From<PErr> + 'static,
PublishAck: TryFrom<PErr, Error = Err>,
PErr: 'static,
impl<Err, PErr> ClientRouter<Err, PErr>where
Err: From<PErr> + 'static,
PublishAck: TryFrom<PErr, Error = Err>,
PErr: 'static,
sourcepub fn resource<T, F, S>(self, address: T, service: F) -> Selfwhere
T: IntoPattern,
F: IntoService<S, Publish>,
S: Service<Publish, Response = PublishAck, 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 = PublishAck, 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
sourcepub fn into_inner(self) -> (IoBoxed, Codec)
pub fn into_inner(self) -> (IoBoxed, Codec)
Get negotiated io stream and codec
Trait Implementations
Auto Trait Implementations
impl<Err, PErr> !RefUnwindSafe for ClientRouter<Err, PErr>
impl<Err, PErr> !Send for ClientRouter<Err, PErr>
impl<Err, PErr> !Sync for ClientRouter<Err, PErr>
impl<Err, PErr> Unpin for ClientRouter<Err, PErr>where
Err: Unpin,
impl<Err, PErr> !UnwindSafe for ClientRouter<Err, PErr>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more