pub struct LineBoundary { /* private fields */ }Expand description
A TextBoundary subclass for locating closest line breaks to a given
position.
When the given position points to a hard line break, the returned range
is the line’s content range before the hard line break, and does not contain
the given position. For instance, the line breaks at position = 1 for
“a\nb” is [0, 1), which does not contain the position 1.
Implementations§
Source§impl LineBoundary
impl LineBoundary
Sourcepub fn new(text_layout: RenderHandle<RenderEditable>) -> LineBoundary
pub fn new(text_layout: RenderHandle<RenderEditable>) -> LineBoundary
Creates a LineBoundary with the text and layout information.
Trait Implementations§
Source§impl Clone for LineBoundary
impl Clone for LineBoundary
impl Copy for LineBoundary
Source§impl Debug for LineBoundary
impl Debug for LineBoundary
Source§impl TextBoundary for LineBoundary
impl TextBoundary for LineBoundary
Source§fn get_text_boundary_at(&self, app: &mut App, position: i32) -> TextRange
fn get_text_boundary_at(&self, app: &mut App, position: i32) -> TextRange
Returns the text boundary range that encloses the input position. Read more
Auto Trait Implementations§
impl Freeze for LineBoundary
impl RefUnwindSafe for LineBoundary
impl Send for LineBoundary
impl Sync for LineBoundary
impl Unpin for LineBoundary
impl UnsafeUnpin for LineBoundary
impl UnwindSafe for LineBoundary
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