pub struct Router { /* private fields */ }Implementations§
Source§impl Router
impl Router
pub fn new(router_id: RouterId, config: RouterConfig) -> Router
Sourcepub fn spawn(self) -> Sender<(ConnectionId, Event)>
pub fn spawn(self) -> Sender<(ConnectionId, Event)>
Starts the router in a background thread and returns link to it. Link to communicate with router should only be returned only after it starts. For that reason, all the public methods should start the router in the background
pub fn handle_last_will(&mut self, client_id: String)
Auto Trait Implementations§
impl Freeze for Router
impl !RefUnwindSafe for Router
impl Send for Router
impl Sync for Router
impl Unpin for Router
impl !UnwindSafe for Router
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