pub struct Router<E, R: Receive<E>> { /* private fields */ }
Implementations§
Source§impl<E, R: Receive<E>> Router<E, R>
impl<E, R: Receive<E>> Router<E, R>
pub fn new(receiver: R) -> Self
pub fn with_intercept( intercept: Box<dyn Route<E, Output = E>>, receiver: R, ) -> Self
pub fn with_intercept_from_receiver(
intercept: impl Receive<E, Output = E> + 'static,
receiver: R,
) -> Selfwhere
E: 'static,
pub fn new_exposed(receiver: R) -> Router<E, Exposed<E, R>>
pub fn new_exposed_with_viewers( receiver: R, viewers: ReassignableCountedMap<usize, Box<dyn View<E>>>, ) -> Router<E, Exposed<E, R>>
pub fn new_exposed_with_intercept( intercept: Box<dyn Route<E, Output = E>>, receiver: R, ) -> Router<E, Exposed<E, R>>
pub fn new_exposed_with_intercept_from_receiver(
intercept: impl Receive<E, Output = E> + 'static,
receiver: R,
) -> Router<E, Exposed<E, R>>where
E: 'static,
pub fn get_receiver(&self) -> &R
pub fn get_receiver_mut(&mut self) -> &mut R
pub fn get_intercept(&self) -> Option<&dyn Route<E, Output = E>>
pub fn intercept_from_receiver(
&mut self,
intercept: impl Receive<E, Output = E> + 'static,
)where
E: 'static,
pub fn intercept_at_root_from_receiver(
&mut self,
intercept: impl Receive<E, Output = E> + 'static,
)where
E: 'static,
pub fn delete_top_intercept(&mut self) -> Option<Box<dyn Route<E, Output = E>>>
Trait Implementations§
Auto Trait Implementations§
impl<E, R> Freeze for Router<E, R>where
R: Freeze,
impl<E, R> !RefUnwindSafe for Router<E, R>
impl<E, R> !Send for Router<E, R>
impl<E, R> !Sync for Router<E, R>
impl<E, R> Unpin for Router<E, R>where
R: Unpin,
impl<E, R> !UnwindSafe for Router<E, R>
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