pub struct Router<S, E> { /* private fields */ }
Expand description
Router - structure that follows the builder pattern for building publish packet router instances for mqtt server.
Implementations§
Source§impl<S, E> Router<S, E>where
S: Clone + 'static,
E: 'static,
impl<S, E> Router<S, E>where
S: Clone + 'static,
E: 'static,
Sourcepub fn resource<T, F, U>(self, address: T, service: F) -> Selfwhere
T: IntoPattern,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish<S>, Response = (), Error = E> + 'static,
E: From<U::InitError>,
pub fn resource<T, F, U>(self, address: T, service: F) -> Selfwhere
T: IntoPattern,
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish<S>, Response = (), Error = E> + 'static,
E: From<U::InitError>,
Configure mqtt resource for a specific topic.
Sourcepub fn default_resource<F, U>(self, service: F) -> Selfwhere
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish<S>, Response = (), Error = E, InitError = E> + 'static,
pub fn default_resource<F, U>(self, service: F) -> Selfwhere
F: IntoServiceFactory<U>,
U: ServiceFactory<Config = S, Request = Publish<S>, Response = (), Error = E, InitError = E> + 'static,
Default service to be used if no matching resource could be found.
Auto Trait Implementations§
impl<S, E> Freeze for Router<S, E>
impl<S, E> !RefUnwindSafe for Router<S, E>
impl<S, E> !Send for Router<S, E>
impl<S, E> !Sync for Router<S, E>
impl<S, E> Unpin for Router<S, E>
impl<S, E> !UnwindSafe for Router<S, E>
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