pub struct MemoryHistory { /* private fields */ }Expand description
An in-memory history stack, used on native targets and in tests.
Implementations§
Source§impl MemoryHistory
impl MemoryHistory
Trait Implementations§
Source§impl Clone for MemoryHistory
impl Clone for MemoryHistory
Source§impl Debug for MemoryHistory
impl Debug for MemoryHistory
Source§impl History for MemoryHistory
impl History for MemoryHistory
Source§fn current(&self) -> HistoryEntry
fn current(&self) -> HistoryEntry
The current entry. Used to pick the initial route.
Source§fn back(&mut self)
fn back(&mut self)
Moves one entry back. The resulting entry is reported through
History::poll.Source§fn forward(&mut self)
fn forward(&mut self)
Moves one entry forward. The resulting entry is reported through
History::poll.fn can_go_back(&self) -> bool
fn can_go_forward(&self) -> bool
Source§fn poll(&mut self, _ctx: &Context) -> Option<HistoryEntry>
fn poll(&mut self, _ctx: &Context) -> Option<HistoryEntry>
Returns the entry the history moved to by itself since the last call (back/forward,
or the browser’s buttons). Entries the history doesn’t know (e.g. the user edited the
url’s
#hash) must be given a fresh key. Read moreSource§fn shows_links(&self) -> bool
fn shows_links(&self) -> bool
Whether
History::hover_link shows hovered links to the platform, which then also
opens them in a new tab on Ctrl/Cmd/Shift-click (so the router doesn’t follow those).Source§fn hover_link(&mut self, _url: Option<&str>)
fn hover_link(&mut self, _url: Option<&str>)
Called after every frame with the url of the link under the
pointer, if any.
Source§fn set_blocking(&mut self, _blocking: bool)
fn set_blocking(&mut self, _blocking: bool)
Called whenever the page starts or stops
blocking navigation, e.g. to have the browser
confirm closing or reloading the tab.
Auto Trait Implementations§
impl Forget for MemoryHistory
impl Freeze for MemoryHistory
impl Move for MemoryHistory
impl RefUnwindSafe for MemoryHistory
impl Send for MemoryHistorywhere
RawVecInner: Send,
impl Sync for MemoryHistorywhere
RawVecInner: Sync,
impl Unpin for MemoryHistory
impl UnsafeUnpin for MemoryHistory
impl UnwindSafe for MemoryHistorywhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more