Struct data_router::router::Router
source · 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(reciever: R) -> Self
pub fn with_intercept( intercept: Box<dyn Route<E, Output = E>>, reciever: R ) -> Self
pub fn with_intercept_from_receiver(
intercept: impl Receive<E, Output = E> + 'static,
receiver: R
) -> Selfwhere
E: 'static,
pub fn new_exposed(reciever: R) -> Router<E, Exposed<E, R>>
pub fn new_exposed_with_viewers( reciever: 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>>, reciever: 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_reciever(&self) -> &R
pub fn get_reciever_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,
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