pub struct VisualLineInfo {
pub visual_line_count: usize,
pub wrap_points: Vec<WrapPoint>,
}Expand description
Visual line information
Fields§
§visual_line_count: usizeNumber of visual lines corresponding to this logical line
wrap_points: Vec<WrapPoint>List of wrap points
Implementations§
Source§impl VisualLineInfo
impl VisualLineInfo
Sourcepub fn from_text(text: &str, viewport_width: usize) -> Self
pub fn from_text(text: &str, viewport_width: usize) -> Self
Calculate visual line information from text and width constraint
Sourcepub fn from_text_with_tab_width(
text: &str,
viewport_width: usize,
tab_width: usize,
) -> Self
pub fn from_text_with_tab_width( text: &str, viewport_width: usize, tab_width: usize, ) -> Self
Calculate visual line information from text and width constraint, with explicit tab_width.
Trait Implementations§
Source§impl Clone for VisualLineInfo
impl Clone for VisualLineInfo
Source§fn clone(&self) -> VisualLineInfo
fn clone(&self) -> VisualLineInfo
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 Debug for VisualLineInfo
impl Debug for VisualLineInfo
Auto Trait Implementations§
impl Freeze for VisualLineInfo
impl RefUnwindSafe for VisualLineInfo
impl Send for VisualLineInfo
impl Sync for VisualLineInfo
impl Unpin for VisualLineInfo
impl UnwindSafe for VisualLineInfo
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