pub struct ParagraphBoundary { /* private fields */ }Expand description
A text boundary that uses paragraphs as logical boundaries.
A paragraph is defined as the range between line terminators. If no line terminators exist then the paragraph boundary is the entire document.
Implementations§
Source§impl ParagraphBoundary
impl ParagraphBoundary
Sourcepub fn new(text: &str) -> ParagraphBoundary
pub fn new(text: &str) -> ParagraphBoundary
Creates a ParagraphBoundary with the text.
Trait Implementations§
Source§impl Clone for ParagraphBoundary
impl Clone for ParagraphBoundary
Source§impl Debug for ParagraphBoundary
impl Debug for ParagraphBoundary
Source§impl TextBoundary for ParagraphBoundary
impl TextBoundary for ParagraphBoundary
Source§fn get_leading_text_boundary_at(
&self,
_app: &mut App,
position: i32,
) -> Option<i32>
fn get_leading_text_boundary_at( &self, _app: &mut App, position: i32, ) -> Option<i32>
Returns the offset representing the start position of the paragraph that
bounds the given position. The returned offset is the position of the code unit
that follows the line terminator that encloses the desired paragraph.
Source§fn get_trailing_text_boundary_at(
&self,
_app: &mut App,
position: i32,
) -> Option<i32>
fn get_trailing_text_boundary_at( &self, _app: &mut App, position: i32, ) -> Option<i32>
Returns the offset representing the end position of the paragraph that
bounds the given position. The returned offset is the position of the
code unit representing the trailing line terminator that encloses the
desired paragraph.
Auto Trait Implementations§
impl Freeze for ParagraphBoundary
impl RefUnwindSafe for ParagraphBoundary
impl Send for ParagraphBoundary
impl Sync for ParagraphBoundary
impl Unpin for ParagraphBoundary
impl UnsafeUnpin for ParagraphBoundary
impl UnwindSafe for ParagraphBoundary
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