pub struct LineInfo {
pub width: usize,
pub char_width: usize,
pub height: usize,
pub start_column: usize,
pub column_offset: usize,
pub row_offset: usize,
pub char_offset: usize,
}Expand description
LineInfo is a helper for keeping track of line information regarding soft-wrapped lines.
Fields§
§width: usizeWidth is the number of columns in the line.
char_width: usizeCharWidth is the number of characters in the line to account for double-width runes.
height: usizeHeight is the number of rows in the line.
start_column: usizeStartColumn is the index of the first column of the line.
column_offset: usizeColumnOffset is the number of columns that the cursor is offset from the start of the line.
row_offset: usizeRowOffset is the number of rows that the cursor is offset from the start of the line.
char_offset: usizeCharOffset is the number of characters that the cursor is offset from the start of the line. This will generally be equivalent to ColumnOffset, but will be different if there are double-width runes before the cursor.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LineInfo
impl RefUnwindSafe for LineInfo
impl Send for LineInfo
impl Sync for LineInfo
impl Unpin for LineInfo
impl UnsafeUnpin for LineInfo
impl UnwindSafe for LineInfo
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