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, Control<Err>>,
S: Service<Control<Err>, Response = ControlAck, Error = Err> + 'static,
pub async fn start<F, S>(self, service: F) -> Result<(), MqttError<Err>>where
F: IntoService<S, Control<Err>>,
S: Service<Control<Err>, Response = ControlAck, Error = Err> + 'static,
Run client and handle control messages
Trait Implementations§
Auto Trait Implementations§
impl<Err, PErr> !Freeze for ClientRouter<Err, PErr>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more