pub struct WrapMap { /* private fields */ }Implementations§
Source§impl WrapMap
impl WrapMap
pub fn new<'a>( lines: impl Iterator<Item = &'a str>, max_width: u32, policy: &WrapPolicy, ) -> Self
pub const fn max_width(&self) -> u32
pub fn line_count(&self) -> u32
pub fn visual_line_count(&self, line: u32) -> u32
pub fn total_visual_lines(&self) -> u32
pub fn wrap_points(&self, line: u32) -> &[WrapPoint]
pub fn visual_lines(&self, line: u32, line_len: u32) -> Vec<VisualLine>
pub fn visual_layout_space( &self, line: u32, local_visual_line: u32, line_text: &str, policy: &WrapPolicy, line_layout_policy: &LineLayoutPolicy, ) -> VisualLayoutSpace
pub fn to_visual_line(&self, line: u32, byte_offset_in_line: u32) -> u32
pub fn from_visual_line(&self, visual_line: u32) -> (u32, u32)
pub fn rewrap_line(&mut self, line: u32, line_text: &str, policy: &WrapPolicy)
pub fn set_max_width<'a>( &mut self, max_width: u32, lines: impl Iterator<Item = &'a str>, policy: &WrapPolicy, )
pub fn splice_lines<'a>( &mut self, start_line: u32, removed_count: u32, new_lines: impl Iterator<Item = &'a str>, policy: &WrapPolicy, )
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WrapMap
impl RefUnwindSafe for WrapMap
impl Send for WrapMap
impl Sync for WrapMap
impl Unpin for WrapMap
impl UnsafeUnpin for WrapMap
impl UnwindSafe for WrapMap
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