pub struct Router<S, Err> { /* fields omitted */ }
Expand description
Router - structure that follows the builder pattern
for building publish packet router instances for mqtt server.
impl<S, Err> Router<S, Err> where
S: Clone + 'static,
Err: 'static,
pub fn new<F, U: 'static>(default_service: F) -> Self where
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish, Response = (), Error = Err, InitError = Err>,
Create mqtt application router.
Default service to be used if no matching resource could be found.
pub fn resource<T, F, U: 'static>(self, address: T, service: F) -> Self where
T: IntoPattern,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish, Response = (), Error = Err>,
Err: From<U::InitError>,
Configure mqtt resource for a specific topic.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the current Span
, returning an
Instrumented
wrapper. Read more
impl<T, U> Into<U> for T where
U: From<T>,
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.