pub struct CharacterBoundary { /* private fields */ }Expand description
A TextBoundary subclass for retrieving the range of the grapheme the given
position is in.
The class is implemented using the unicode-segmentation crate, which supplies the
same UAX #29 grapheme clusters as the characters package Dart uses.
Implementations§
Source§impl CharacterBoundary
impl CharacterBoundary
Sourcepub fn new(text: impl Into<String>) -> CharacterBoundary
pub fn new(text: impl Into<String>) -> CharacterBoundary
Creates a CharacterBoundary with the text.
Trait Implementations§
Source§impl Clone for CharacterBoundary
impl Clone for CharacterBoundary
Source§impl Debug for CharacterBoundary
impl Debug for CharacterBoundary
Source§impl TextBoundary for CharacterBoundary
impl TextBoundary for CharacterBoundary
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 of the closest text boundary before or at the given
position, or None if no boundaries can be found. Read moreAuto Trait Implementations§
impl Freeze for CharacterBoundary
impl RefUnwindSafe for CharacterBoundary
impl Send for CharacterBoundary
impl Sync for CharacterBoundary
impl Unpin for CharacterBoundary
impl UnsafeUnpin for CharacterBoundary
impl UnwindSafe for CharacterBoundary
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