pub struct Span {
pub row: usize,
pub end_row: usize,
pub col: usize,
pub end_col: usize,
}Fields§
§row: usize§end_row: usize§col: usize§end_col: usizeImplementations§
Source§impl Span
impl Span
pub fn new(row: usize, end_row: usize, col: usize, end_col: usize) -> Self
Sourcepub fn kind(&self) -> SelectionKind
pub fn kind(&self) -> SelectionKind
Returns the SelectionKind:
end_row == NO_ENDbutend_col != NO_END→Rowsend_col == NO_ENDbutend_row != NO_END→Cols- anything else →
Cells
Sourcepub fn rows_start_end(&self, grid: &TableGrid) -> (usize, usize)
pub fn rows_start_end(&self, grid: &TableGrid) -> (usize, usize)
Inclusive start index and end index of the span
Sourcepub fn cols_start_end(&self, grid: &TableGrid) -> (usize, usize)
pub fn cols_start_end(&self, grid: &TableGrid) -> (usize, usize)
Inclusive start index and end index of the span
Trait Implementations§
impl Copy for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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