pub struct RouterState<RouteState: Updatable> { /* private fields */ }Implementations
sourceimpl<RouteState: Updatable> RouterState<RouteState>
impl<RouteState: Updatable> RouterState<RouteState>
pub fn new(
initial_route: RouteId,
initial_routes: HashMap<RouteId, RouteState>
) -> Self
pub fn update(&mut self, message: Message<RouteState::Message>)
pub fn add_route(&mut self, route_id: RouteId, state: RouteState)
pub fn route<Message, F>(
&mut self,
route_id: RouteIdRef<'_>,
renderer: F
) -> Element<'_, Message>where
F: Fn(&mut RouteState) -> Element<'_, Message>,
Auto Trait Implementations
impl<RouteState> RefUnwindSafe for RouterState<RouteState>where
RouteState: RefUnwindSafe,
impl<RouteState> Send for RouterState<RouteState>where
RouteState: Send,
impl<RouteState> Sync for RouterState<RouteState>where
RouteState: Sync,
impl<RouteState> Unpin for RouterState<RouteState>where
RouteState: Unpin,
impl<RouteState> UnwindSafe for RouterState<RouteState>where
RouteState: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more