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.
Sourcepub fn from_text_with_options(
text: &str,
viewport_width: usize,
tab_width: usize,
wrap_mode: WrapMode,
) -> Self
pub fn from_text_with_options( text: &str, viewport_width: usize, tab_width: usize, wrap_mode: WrapMode, ) -> Self
Calculate visual line information with explicit options.
Sourcepub fn from_text_with_layout_options(
text: &str,
viewport_width: usize,
tab_width: usize,
wrap_mode: WrapMode,
wrap_indent: WrapIndent,
) -> Self
pub fn from_text_with_layout_options( text: &str, viewport_width: usize, tab_width: usize, wrap_mode: WrapMode, wrap_indent: WrapIndent, ) -> Self
Calculate visual line information with explicit layout options.
Trait Implementations§
Source§impl Clone for VisualLineInfo
impl Clone for VisualLineInfo
Source§impl Debug for VisualLineInfo
impl Debug for VisualLineInfo
Auto Trait Implementations§
impl Forget for VisualLineInfo
impl Freeze for VisualLineInfo
impl Move for VisualLineInfo
impl RefUnwindSafe for VisualLineInfo
impl Send for VisualLineInfowhere
RawVecInner: Send,
impl Sync for VisualLineInfowhere
RawVecInner: Sync,
impl Unpin for VisualLineInfo
impl UnsafeUnpin for VisualLineInfo
impl UnwindSafe for VisualLineInfowhere
RawVecInner: UnwindSafe,
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