Enum gloo_history::AnyHistory
source · pub enum AnyHistory {
Browser(BrowserHistory),
Hash(HashHistory),
Memory(MemoryHistory),
}
Expand description
A History
that provides a universal API to the underlying history type.
Variants§
Browser(BrowserHistory)
A Browser History.
Hash(HashHistory)
A Hash History
Memory(MemoryHistory)
A Memory History
Trait Implementations§
source§impl Clone for AnyHistory
impl Clone for AnyHistory
source§fn clone(&self) -> AnyHistory
fn clone(&self) -> AnyHistory
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 AnyHistory
impl Debug for AnyHistory
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 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 From<MemoryHistory> for AnyHistory
impl From<MemoryHistory> for AnyHistory
source§fn from(m: MemoryHistory) -> AnyHistory
fn from(m: MemoryHistory) -> AnyHistory
Converts to this type from the input type.
source§impl History for AnyHistory
impl History for AnyHistory
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<()>where
Q: Serialize,
fn push_with_query<'a, Q>( &self, route: impl Into<Cow<'a, str>>, query: Q ) -> HistoryResult<()>where Q: Serialize,
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<()>where
Q: Serialize,
fn replace_with_query<'a, Q>( &self, route: impl Into<Cow<'a, str>>, query: Q ) -> HistoryResult<()>where Q: Serialize,
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<()>where
Q: Serialize,
T: 'static,
fn push_with_query_and_state<'a, Q, T>( &self, route: impl Into<Cow<'a, str>>, query: Q, state: T ) -> HistoryResult<()>where Q: Serialize, 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<()>where
Q: Serialize,
T: 'static,
fn replace_with_query_and_state<'a, Q, T>( &self, route: impl Into<Cow<'a, str>>, query: Q, state: T ) -> HistoryResult<()>where Q: Serialize, T: 'static,
Same as
.replace_with_state()
but affix the queries to the end of the route.source§impl PartialEq<AnyHistory> for AnyHistory
impl PartialEq<AnyHistory> for AnyHistory
source§fn eq(&self, other: &AnyHistory) -> bool
fn eq(&self, other: &AnyHistory) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for AnyHistory
Auto Trait Implementations§
impl !RefUnwindSafe for AnyHistory
impl !Send for AnyHistory
impl !Sync for AnyHistory
impl Unpin for AnyHistory
impl !UnwindSafe for AnyHistory
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