Struct ntex_mqtt::v5::Router [−][src]
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.
Implementations
pub fn new<F, U: 'static>(default_service: F) -> Self where
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish, Response = PublishAck, Error = Err, InitError = Err>,
pub fn new<F, U: 'static>(default_service: F) -> Self where
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish, Response = PublishAck, 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 = PublishAck, Error = Err>,
Err: From<U::InitError>,
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 = PublishAck, Error = Err>,
Err: From<U::InitError>,
Configure mqtt resource for a specific topic.
Auto Trait Implementations
impl<S, Err> !RefUnwindSafe for Router<S, Err>
impl<S, Err> !UnwindSafe for Router<S, Err>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more