pub struct Letters { /* private fields */ }
Expand description
The collection of letters (Graphemes) of a string.
These letters are the core part of the fuzzy matching algorithm.
This type is not used directly but through the Text type, which is an Arc wrapper around this type. We use Arc to reduce the String allocations between tasks as much as possible.
Implementations§
source§impl Letters
impl Letters
pub fn new(string: String) -> Self
pub fn len(&self) -> usize
pub fn last_index(&self) -> usize
pub fn grapheme_at(&self, index: usize) -> &str
pub fn lowercase_grapheme_at(&self, index: usize) -> &str
pub fn iter(&self) -> Iter<'_, String>
pub fn lowercase_iter(&self) -> Iter<'_, String>
pub fn is_empty(&self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Letters
impl Send for Letters
impl Sync for Letters
impl Unpin for Letters
impl UnwindSafe for Letters
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