pub struct Router<S: AppState> { /* private fields */ }Implementations§
Source§impl<S: AppState> Router<S>
impl<S: AppState> Router<S>
pub fn new(state: Arc<S>) -> Self
pub fn spawn_module<F: Future<Output = ()> + Send + 'static>(&mut self, task: F)
pub fn add_module_rule( &mut self, rule: Box<dyn Rule + Send + Sync>, sender: AsyncSender<Arc<Message>>, )
pub fn add_lightweight_rule( &mut self, rule: Box<dyn Rule + Send + Sync>, sender: AsyncSender<Arc<Message>>, )
pub fn add_lightweight_handler(&mut self, handler: LightweightHandler<S>)
pub fn spawn_lightweight_module<F: Future<Output = ()> + Send + 'static>( &mut self, task: F, )
Auto Trait Implementations§
impl<S> Freeze for Router<S>
impl<S> !RefUnwindSafe for Router<S>
impl<S> Send for Router<S>
impl<S> Sync for Router<S>
impl<S> Unpin for Router<S>
impl<S> UnsafeUnpin for Router<S>
impl<S> !UnwindSafe for Router<S>
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