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,
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) -> Self where
T: IntoPattern,
F: IntoService<S, Publish>,
S: Service<Publish, Response = (), Error = PErr> + 'static,
pub fn resource<T, F, S>(self, address: T, service: F) -> Self where
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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more