Struct HashHistory
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§
§impl HashHistory
impl HashHistory
pub fn new() -> HashHistory
pub fn new() -> HashHistory
Creates a new HashHistory
Trait Implementations§
§impl Clone for HashHistory
impl Clone for HashHistory
§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 more§impl Debug for HashHistory
impl Debug for HashHistory
§impl Default for HashHistory
impl Default for HashHistory
§fn default() -> HashHistory
fn default() -> HashHistory
Returns the “default value” for a type. Read more
§impl From<HashHistory> for AnyHistory
impl From<HashHistory> for AnyHistory
§fn from(m: HashHistory) -> AnyHistory
fn from(m: HashHistory) -> AnyHistory
Converts to this type from the input type.
§impl History for HashHistory
impl History for HashHistory
§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.§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.
§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.
§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.§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.§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.§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.§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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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.