pub struct ListCursor {
pub position: usize,
pub text_row: usize,
}Expand description
A position within a list.
Fields§
§position: usizeThe position of the selected item within the list.
text_row: usizeImplementations§
Trait Implementations§
Source§impl Clone for ListCursor
impl Clone for ListCursor
Source§fn clone(&self) -> ListCursor
fn clone(&self) -> ListCursor
Returns a duplicate 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<T, I> CursorMovements<ListCursor> for ListState<T, I>where
T: ListItem<I>,
I: ApplicationInfo,
impl<T, I> CursorMovements<ListCursor> for ListState<T, I>where
T: ListItem<I>,
I: ApplicationInfo,
Source§fn first_word(
&self,
pos: &ListCursor,
_: &CursorMovementsContext<'_, ListCursor>,
) -> ListCursor
fn first_word( &self, pos: &ListCursor, _: &CursorMovementsContext<'_, ListCursor>, ) -> ListCursor
Calculate the position of the first word on the line of the provided cursor.
Source§fn movement(
&self,
pos: &ListCursor,
movement: &MoveType,
count: &Count,
ctx: &CursorMovementsContext<'_, ListCursor>,
) -> Option<ListCursor>
fn movement( &self, pos: &ListCursor, movement: &MoveType, count: &Count, ctx: &CursorMovementsContext<'_, ListCursor>, ) -> Option<ListCursor>
Calculate the position of the cursor after performing a movement.
Source§fn range_of_movement(
&self,
pos: &ListCursor,
movement: &MoveType,
count: &Count,
ctx: &CursorMovementsContext<'_, ListCursor>,
) -> Option<EditRange<ListCursor>>
fn range_of_movement( &self, pos: &ListCursor, movement: &MoveType, count: &Count, ctx: &CursorMovementsContext<'_, ListCursor>, ) -> Option<EditRange<ListCursor>>
Calculate a cursor range from the given cursor to the location after performing the
given movement.
Source§fn range(
&self,
pos: &ListCursor,
range: &RangeType,
_: bool,
count: &Count,
ctx: &CursorMovementsContext<'_, ListCursor>,
) -> Option<EditRange<ListCursor>>
fn range( &self, pos: &ListCursor, range: &RangeType, _: bool, count: &Count, ctx: &CursorMovementsContext<'_, ListCursor>, ) -> Option<EditRange<ListCursor>>
Calculate a cursor range based on a given cursor position and a RangeType.
Source§impl<T, I> CursorSearch<ListCursor> for ListState<T, I>where
T: ListItem<I>,
I: ApplicationInfo,
impl<T, I> CursorSearch<ListCursor> for ListState<T, I>where
T: ListItem<I>,
I: ApplicationInfo,
Source§fn find_char(
&self,
_: &ListCursor,
_: bool,
_: MoveDir1D,
_: bool,
_: char,
_: usize,
) -> Option<ListCursor>
fn find_char( &self, _: &ListCursor, _: bool, _: MoveDir1D, _: bool, _: char, _: usize, ) -> Option<ListCursor>
Search for a specific character.
Source§fn find_matches(
&self,
_: &ListCursor,
_: &ListCursor,
_: &Regex,
) -> Vec<EditRange<ListCursor>>
fn find_matches( &self, _: &ListCursor, _: &ListCursor, _: &Regex, ) -> Vec<EditRange<ListCursor>>
Find matches for a regular expression within a range.
Source§fn find_regex(
&self,
pos: &ListCursor,
dir: MoveDir1D,
needle: &Regex,
count: usize,
) -> Option<EditRange<ListCursor>>
fn find_regex( &self, pos: &ListCursor, dir: MoveDir1D, needle: &Regex, count: usize, ) -> Option<EditRange<ListCursor>>
Search for a regular expression.
Source§impl Debug for ListCursor
impl Debug for ListCursor
Source§impl Default for ListCursor
impl Default for ListCursor
Source§fn default() -> ListCursor
fn default() -> ListCursor
Returns the “default value” for a type. Read more
Source§impl From<usize> for ListCursor
impl From<usize> for ListCursor
Source§impl Ord for ListCursor
impl Ord for ListCursor
Source§impl PartialEq for ListCursor
impl PartialEq for ListCursor
Source§impl PartialOrd for ListCursor
impl PartialOrd for ListCursor
impl Eq for ListCursor
impl StructuralPartialEq for ListCursor
Auto Trait Implementations§
impl Freeze for ListCursor
impl RefUnwindSafe for ListCursor
impl Send for ListCursor
impl Sync for ListCursor
impl Unpin for ListCursor
impl UnsafeUnpin for ListCursor
impl UnwindSafe for ListCursor
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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