Struct gloo_history::HashHistory
source · 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() -> Self
pub fn new() -> Self
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§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
) -> HistoryResult<(), Q::Error>where
Q: ToQuery,
fn push_with_query<'a, Q>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q
) -> HistoryResult<(), Q::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
) -> HistoryResult<(), Q::Error>where
Q: ToQuery,
fn replace_with_query<'a, Q>(
&self,
route: impl Into<Cow<'a, str>>,
query: Q
) -> HistoryResult<(), Q::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
) -> HistoryResult<(), Q::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
) -> HistoryResult<(), Q::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
) -> HistoryResult<(), Q::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
) -> HistoryResult<(), Q::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
source§fn eq(&self, other: &HashHistory) -> bool
fn eq(&self, other: &HashHistory) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for HashHistory
Auto Trait Implementations§
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