pub struct EguiRouter<State, History = DefaultHistory> { /* private fields */ }Expand description
A router instance
Implementations§
Source§impl<State: 'static, H: History + Default> EguiRouter<State, H>
impl<State: 'static, H: History + Default> EguiRouter<State, H>
Sourcepub fn builder() -> RouterBuilder<State, H>
pub fn builder() -> RouterBuilder<State, H>
Create a new RouterBuilder
Sourcepub fn active_route(&self) -> Option<&str>
pub fn active_route(&self) -> Option<&str>
Get the active route
Sourcepub fn history_len(&self) -> usize
pub fn history_len(&self) -> usize
How many history entries are there?
Navigate with a custom transition
Navigate with the default transition
Sourcepub fn back_transition(
&mut self,
transition_config: TransitionConfig,
) -> RouterResult
pub fn back_transition( &mut self, transition_config: TransitionConfig, ) -> RouterResult
Go back with a custom transition
Sourcepub fn back(&mut self) -> RouterResult
pub fn back(&mut self) -> RouterResult
Go back with the default transition
Sourcepub fn replace_transition(
&mut self,
state: &mut State,
path: impl Into<String>,
transition_config: TransitionConfig,
) -> RouterResult
pub fn replace_transition( &mut self, state: &mut State, path: impl Into<String>, transition_config: TransitionConfig, ) -> RouterResult
Replace the current route with a custom transition
Sourcepub fn replace(
&mut self,
state: &mut State,
path: impl Into<String>,
) -> RouterResult
pub fn replace( &mut self, state: &mut State, path: impl Into<String>, ) -> RouterResult
Replace the current route with the default transition
Sourcepub fn ui(&mut self, ui: &mut Ui, state: &mut State)
pub fn ui(&mut self, ui: &mut Ui, state: &mut State)
Render the router
Auto Trait Implementations§
impl<State, History = MemoryHistory> !Freeze for EguiRouter<State, History>
impl<State, History = MemoryHistory> !RefUnwindSafe for EguiRouter<State, History>
impl<State, History = MemoryHistory> !Send for EguiRouter<State, History>
impl<State, History = MemoryHistory> !Sync for EguiRouter<State, History>
impl<State, History> Unpin for EguiRouter<State, History>where
History: Unpin,
impl<State, History = MemoryHistory> !UnwindSafe for EguiRouter<State, History>
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