pub struct Navigator { /* private fields */ }
Expand description
A struct to navigate between locations.
Implementations§
Sourcepub fn go(&self, delta: isize)
pub fn go(&self, delta: isize)
Navigate to a specific page with a delta
relative to current page.
See: https://developer.mozilla.org/en-US/docs/Web/API/History/go
Sourcepub fn push_with_state<R, T>(&self, route: &R, state: T)where
R: Routable,
T: 'static,
pub fn push_with_state<R, T>(&self, route: &R, state: T)where
R: Routable,
T: 'static,
Pushes a Routable
entry with state.
Sourcepub fn replace_with_state<R, T>(&self, route: &R, state: T)where
R: Routable,
T: 'static,
pub fn replace_with_state<R, T>(&self, route: &R, state: T)where
R: Routable,
T: 'static,
Replaces the current history entry with provided Routable
and state.
Sourcepub fn push_with_query<R, Q>(
&self,
route: &R,
query: &Q,
) -> NavigationResult<()>
pub fn push_with_query<R, Q>( &self, route: &R, query: &Q, ) -> NavigationResult<()>
Same as .push()
but affix the queries to the end of the route.
Sourcepub fn replace_with_query<R, Q>(
&self,
route: &R,
query: &Q,
) -> NavigationResult<()>
pub fn replace_with_query<R, Q>( &self, route: &R, query: &Q, ) -> NavigationResult<()>
Same as .replace()
but affix the queries to the end of the route.
Sourcepub fn push_with_query_and_state<R, Q, T>(
&self,
route: &R,
query: &Q,
state: T,
) -> NavigationResult<()>
pub fn push_with_query_and_state<R, Q, T>( &self, route: &R, query: &Q, state: T, ) -> NavigationResult<()>
Same as .push_with_state()
but affix the queries to the end of the route.
Sourcepub fn replace_with_query_and_state<R, Q, T>(
&self,
route: &R,
query: &Q,
state: T,
) -> NavigationResult<()>
pub fn replace_with_query_and_state<R, Q, T>( &self, route: &R, query: &Q, state: T, ) -> NavigationResult<()>
Same as .replace_with_state()
but affix the queries to the end of the route.
Sourcepub fn kind(&self) -> NavigatorKind
pub fn kind(&self) -> NavigatorKind
Returns the Navigator kind.
Trait Implementations§
Auto Trait Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self
to a value of a Properties
struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self
to a value of a Properties
struct.