pub struct ViewStack<V> { /* private fields */ }Expand description
The views of one window: the one shown, the ones Back returns to and the ones Forward goes on to.
Every move hands in where the person is in the view being left, so the stack can give it back on return. Opening a view drops what Forward held, as a browser does.
Implementations§
Source§impl<V: Clone + PartialEq> ViewStack<V>
impl<V: Clone + PartialEq> ViewStack<V>
pub fn can_go_back(&self) -> bool
pub fn can_go_forward(&self) -> bool
pub fn previous(&self) -> Option<&V>
Sourcepub fn open(&mut self, view: V, left: ViewPlace) -> bool
pub fn open(&mut self, view: V, left: ViewPlace) -> bool
Open view, leaving the one shown at left. Opening the view
already shown changes nothing. Returns whether the view changed; a new
view starts at the top.
Sourcepub fn replace(&mut self, view: V)
pub fn replace(&mut self, view: V)
Show view in place of the one shown, without a step to go back
through: a query view whose text changed as it was typed. Where the
person was is kept.
Sourcepub fn back(&mut self, left: ViewPlace) -> Option<&ViewEntry<V>>
pub fn back(&mut self, left: ViewPlace) -> Option<&ViewEntry<V>>
Go back, leaving the view shown at left. Returns the view now shown
and where to put the person in it; None with nothing to go back to.
Sourcepub fn forward(&mut self, left: ViewPlace) -> Option<&ViewEntry<V>>
pub fn forward(&mut self, left: ViewPlace) -> Option<&ViewEntry<V>>
Go forward again, leaving the view shown at left.
Sourcepub fn note_place(&mut self, place: ViewPlace)
pub fn note_place(&mut self, place: ViewPlace)
Hand in where the person is in the view shown, without moving.
Trait Implementations§
Auto Trait Implementations§
impl<V> Freeze for ViewStack<V>where
V: Freeze,
impl<V> RefUnwindSafe for ViewStack<V>where
V: RefUnwindSafe,
impl<V> Send for ViewStack<V>where
V: Send,
impl<V> Sync for ViewStack<V>where
V: Sync,
impl<V> Unpin for ViewStack<V>where
V: Unpin,
impl<V> UnsafeUnpin for ViewStack<V>where
V: UnsafeUnpin,
impl<V> UnwindSafe for ViewStack<V>where
V: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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> 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>
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>
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