pub struct RowIndex {
pub value: usize,
}
Expand description
This module defines types which role is to abstract the different coordinate and indexing systems the editor has to support. Humans deal with line numbers, starting at 1, which maps to document rows, starting at 0. We define simple types in order to delegate the +1/-1 conversions to them, as it has proven easy to forget these only when dealing with usize values.
Fields
value: usize
Implementations
Trait Implementations
sourceimpl From<LineNumber> for RowIndex
impl From<LineNumber> for RowIndex
sourcefn from(ln: LineNumber) -> Self
fn from(ln: LineNumber) -> Self
Converts to this type from the input type.
sourceimpl From<RowIndex> for LineNumber
impl From<RowIndex> for LineNumber
impl Copy for RowIndex
impl StructuralPartialEq for RowIndex
Auto Trait Implementations
impl RefUnwindSafe for RowIndex
impl Send for RowIndex
impl Sync for RowIndex
impl Unpin for RowIndex
impl UnwindSafe for RowIndex
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more