pub struct WordNavigationOptions<'a> {
pub segment: Option<&'a dyn Fn(&str) -> Vec<WordSegment>>,
pub is_atomic_segment: Option<&'a dyn Fn(&str) -> bool>,
}Expand description
Options for word navigation functions (matching pi’s WordNavigationOptions).
Fields§
§segment: Option<&'a dyn Fn(&str) -> Vec<WordSegment>>Custom segmenter returning word segments for the given text.
When omitted, uses grapheme-based segmentation with is_word_char heuristic.
is_atomic_segment: Option<&'a dyn Fn(&str) -> bool>Predicate identifying atomic segments that should be treated as single units. When provided, segments matching this predicate are skipped atomically.
Trait Implementations§
Source§fn default() -> WordNavigationOptions<'a>
fn default() -> WordNavigationOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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