pub struct HistoryStack { /* private fields */ }Expand description
Browser-like back/forward history.
Implementations§
Source§impl HistoryStack
impl HistoryStack
Sourcepub fn visit_entry(&mut self, entry: HistoryEntry)
pub fn visit_entry(&mut self, entry: HistoryEntry)
Visits a fully described history entry and clears the forward stack.
Sourcepub fn go_back(&mut self) -> Option<&HistoryEntry>
pub fn go_back(&mut self) -> Option<&HistoryEntry>
Moves one step back and returns the new current entry.
Sourcepub fn go_forward(&mut self) -> Option<&HistoryEntry>
pub fn go_forward(&mut self) -> Option<&HistoryEntry>
Moves one step forward and returns the new current entry.
Sourcepub fn current(&self) -> Option<&HistoryEntry>
pub fn current(&self) -> Option<&HistoryEntry>
Returns the current history entry.
Sourcepub fn can_go_back(&self) -> bool
pub fn can_go_back(&self) -> bool
Returns whether back navigation is available.
Sourcepub fn can_go_forward(&self) -> bool
pub fn can_go_forward(&self) -> bool
Returns whether forward navigation is available.
Sourcepub fn entries(&self) -> Vec<&HistoryEntry>
pub fn entries(&self) -> Vec<&HistoryEntry>
Returns all entries in display order.
Sourcepub fn current_index(&self) -> Option<usize>
pub fn current_index(&self) -> Option<usize>
Returns the current entry index in entries.
Trait Implementations§
Source§impl Clone for HistoryStack
impl Clone for HistoryStack
Source§fn clone(&self) -> HistoryStack
fn clone(&self) -> HistoryStack
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HistoryStack
impl Debug for HistoryStack
Source§impl Default for HistoryStack
impl Default for HistoryStack
Source§fn default() -> HistoryStack
fn default() -> HistoryStack
Returns the “default value” for a type. Read more
Source§impl PartialEq for HistoryStack
impl PartialEq for HistoryStack
Source§fn eq(&self, other: &HistoryStack) -> bool
fn eq(&self, other: &HistoryStack) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HistoryStack
impl StructuralPartialEq for HistoryStack
Auto Trait Implementations§
impl Freeze for HistoryStack
impl RefUnwindSafe for HistoryStack
impl Send for HistoryStack
impl Sync for HistoryStack
impl Unpin for HistoryStack
impl UnsafeUnpin for HistoryStack
impl UnwindSafe for HistoryStack
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