pub struct HashHistory { /* private fields */ }
Expand description
A History
that is implemented with web_sys::History
and stores path in #
(fragment).
§Panics
HashHistory does not support relative paths and will panic if routes are not starting with /
.
Implementations§
Source§impl HashHistory
impl HashHistory
Sourcepub fn new() -> HashHistory
pub fn new() -> HashHistory
Creates a new HashHistory
Trait Implementations§
Source§impl Clone for HashHistory
impl Clone for HashHistory
Source§fn clone(&self) -> HashHistory
fn clone(&self) -> HashHistory
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HashHistory
impl Debug for HashHistory
Source§impl Default for HashHistory
impl Default for HashHistory
Source§fn default() -> HashHistory
fn default() -> HashHistory
Returns the “default value” for a type. Read more
Source§impl From<HashHistory> for AnyHistory
impl From<HashHistory> for AnyHistory
Source§fn from(m: HashHistory) -> AnyHistory
fn from(m: HashHistory) -> AnyHistory
Converts to this type from the input type.
Source§impl History for HashHistory
impl History for HashHistory
Source§fn push<'a>(&self, route: impl Into<Cow<'a, str>>)
fn push<'a>(&self, route: impl Into<Cow<'a, str>>)
Pushes a route entry with
None
being the state.Source§fn replace<'a>(&self, route: impl Into<Cow<'a, str>>)
fn replace<'a>(&self, route: impl Into<Cow<'a, str>>)
Replaces the current history entry with provided route and
None
state.Source§fn push_with_state<'a, T>(&self, route: impl Into<Cow<'a, str>>, state: T)where
T: 'static,
fn push_with_state<'a, T>(&self, route: impl Into<Cow<'a, str>>, state: T)where
T: 'static,
Pushes a route entry with state.
Source§fn replace_with_state<'a, T>(&self, route: impl Into<Cow<'a, str>>, state: T)where
T: 'static,
fn replace_with_state<'a, T>(&self, route: impl Into<Cow<'a, str>>, state: T)where
T: 'static,
Replaces the current history entry with provided route and state.
Source§fn push_with_query<'a, Q>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
fn push_with_query<'a, Q>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
Same as
.push()
but affix the queries to the end of the route.Source§fn replace_with_query<'a, Q>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
fn replace_with_query<'a, Q>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
Same as
.replace()
but affix the queries to the end of the route.Source§fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
state: T,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
T: 'static,
fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
state: T,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
T: 'static,
Same as
.push_with_state()
but affix the queries to the end of the route.Source§fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
state: T,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
T: 'static,
fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q,
state: T,
) -> Result<(), <Q as ToQuery>::Error>where
Q: ToQuery,
T: 'static,
Same as
.replace_with_state()
but affix the queries to the end of the route.Source§impl PartialEq for HashHistory
impl PartialEq for HashHistory
impl StructuralPartialEq for HashHistory
Auto Trait Implementations§
impl Freeze for HashHistory
impl !RefUnwindSafe for HashHistory
impl !Send for HashHistory
impl !Sync for HashHistory
impl Unpin for HashHistory
impl !UnwindSafe for HashHistory
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,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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.