pub struct CCursorRange {
pub primary: CCursor,
pub secondary: CCursor,
}
Expand description
A selected text range (could be a range of length zero).
The selection is based on character count (NOT byte count!).
Fields§
§primary: CCursor
When selecting with a mouse, this is where the mouse was released. When moving with e.g. shift+arrows, this is what moves. Note that the two ends can come in any order, and also be equal (no selection).
secondary: CCursor
When selecting with a mouse, this is where the mouse was first pressed. This part of the cursor does not move when shift is down.
Implementations§
Trait Implementations§
Source§impl Clone for CCursorRange
impl Clone for CCursorRange
Source§fn clone(&self) -> CCursorRange
fn clone(&self) -> CCursorRange
Returns a copy 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 Debug for CCursorRange
impl Debug for CCursorRange
Source§impl Default for CCursorRange
impl Default for CCursorRange
Source§fn default() -> CCursorRange
fn default() -> CCursorRange
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CCursorRange
impl<'de> Deserialize<'de> for CCursorRange
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<CCursorRange> for TextCursorState
impl From<CCursorRange> for TextCursorState
Source§fn from(ccursor_range: CCursorRange) -> Self
fn from(ccursor_range: CCursorRange) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CCursorRange
impl PartialEq for CCursorRange
Source§impl Serialize for CCursorRange
impl Serialize for CCursorRange
impl Copy for CCursorRange
impl StructuralPartialEq for CCursorRange
Auto Trait Implementations§
impl Freeze for CCursorRange
impl RefUnwindSafe for CCursorRange
impl Send for CCursorRange
impl Sync for CCursorRange
impl Unpin for CCursorRange
impl UnwindSafe for CCursorRange
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