Enum termwiz::lineedit::SearchDirection
source · [−]pub enum SearchDirection {
Backwards,
Forwards,
}
Expand description
Encodes the direction the search should take, relative to the current HistoryIndex.
Variants
Backwards
The search goes backwards towards the smaller HistoryIndex values at the beginning of history.
Forwards
The search goes forwards towarrds the larger HistoryIndex values at the end of history.
Implementations
sourceimpl SearchDirection
impl SearchDirection
sourcepub fn next(self, idx: HistoryIndex) -> Option<HistoryIndex>
pub fn next(self, idx: HistoryIndex) -> Option<HistoryIndex>
Given a history index, compute the next value in the
encoded search directory.
Returns None
if the search would overflow.
Trait Implementations
sourceimpl Clone for SearchDirection
impl Clone for SearchDirection
sourcefn clone(&self) -> SearchDirection
fn clone(&self) -> SearchDirection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SearchDirection
impl Debug for SearchDirection
sourceimpl PartialEq<SearchDirection> for SearchDirection
impl PartialEq<SearchDirection> for SearchDirection
impl Copy for SearchDirection
impl Eq for SearchDirection
impl StructuralEq for SearchDirection
impl StructuralPartialEq for SearchDirection
Auto Trait Implementations
impl RefUnwindSafe for SearchDirection
impl Send for SearchDirection
impl Sync for SearchDirection
impl Unpin for SearchDirection
impl UnwindSafe for SearchDirection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more