pub struct Router<S, Err> { /* private fields */ }
Expand description
Router - structure that follows the builder pattern for building publish packet router instances for mqtt server.
Implementations§
source§impl<S, Err> Router<S, Err>where
S: 'static,
Err: 'static,
impl<S, Err> Router<S, Err>where
S: 'static,
Err: 'static,
sourcepub fn new<F, U>(default_service: F) -> Selfwhere
F: IntoServiceFactory<U, Publish, Session<S>>,
U: ServiceFactory<Publish, Session<S>, Response = PublishAck, Error = Err, InitError = Err> + 'static,
pub fn new<F, U>(default_service: F) -> Selfwhere
F: IntoServiceFactory<U, Publish, Session<S>>,
U: ServiceFactory<Publish, Session<S>, Response = PublishAck, Error = Err, InitError = Err> + 'static,
Create mqtt application router.
Default service to be used if no matching resource could be found.