Struct gloo::history::BrowserHistory
source · pub struct BrowserHistory { /* private fields */ }
Available on crate feature
history
only.Expand description
A History
that is implemented with web_sys::History
that provides native browser
history and state access.
Implementations§
source§impl BrowserHistory
impl BrowserHistory
sourcepub fn new() -> BrowserHistory
pub fn new() -> BrowserHistory
Creates a new BrowserHistory
Trait Implementations§
source§impl Clone for BrowserHistory
impl Clone for BrowserHistory
source§fn clone(&self) -> BrowserHistory
fn clone(&self) -> BrowserHistory
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 BrowserHistory
impl Debug for BrowserHistory
source§impl Default for BrowserHistory
impl Default for BrowserHistory
source§fn default() -> BrowserHistory
fn default() -> BrowserHistory
Returns the “default value” for a type. Read more
source§impl From<BrowserHistory> for AnyHistory
impl From<BrowserHistory> for AnyHistory
source§fn from(m: BrowserHistory) -> AnyHistory
fn from(m: BrowserHistory) -> AnyHistory
Converts to this type from the input type.
source§impl History for BrowserHistory
impl History for BrowserHistory
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,
Available on crate feature
query
only.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,
Available on crate feature
query
only.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,
Available on crate feature
query
only.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,
Available on crate feature
query
only.Same as
.replace_with_state()
but affix the queries to the end of the route.source§impl PartialEq<BrowserHistory> for BrowserHistory
impl PartialEq<BrowserHistory> for BrowserHistory
source§fn eq(&self, _rhs: &BrowserHistory) -> bool
fn eq(&self, _rhs: &BrowserHistory) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
impl !RefUnwindSafe for BrowserHistory
impl !Send for BrowserHistory
impl !Sync for BrowserHistory
impl Unpin for BrowserHistory
impl !UnwindSafe for BrowserHistory
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