pub struct WordBoundaryConfig { /* private fields */ }Expand description
Word boundary configuration used by editor-friendly “word” operations (selection expansion, double-click selection, etc.).
This intentionally follows a code-editor notion of “word”:
- By default, ASCII identifier-like runs are treated as words.
- Non-ASCII characters are treated as word boundaries (so they form single-character “word units”).
- Whitespace always separates words.
Implementations§
Source§impl WordBoundaryConfig
impl WordBoundaryConfig
Sourcepub fn set_ascii_boundary_chars(&mut self, boundary_chars: &str)
pub fn set_ascii_boundary_chars(&mut self, boundary_chars: &str)
Override the ASCII “word boundary” character set.
- Non-ASCII characters are always treated as boundaries (and therefore form single-character word units).
- ASCII whitespace is always treated as boundary.
This is similar in spirit to VSCode’s wordSeparators.
Trait Implementations§
Source§impl Clone for WordBoundaryConfig
impl Clone for WordBoundaryConfig
Source§fn clone(&self) -> WordBoundaryConfig
fn clone(&self) -> WordBoundaryConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WordBoundaryConfig
impl Debug for WordBoundaryConfig
Auto Trait Implementations§
impl Freeze for WordBoundaryConfig
impl RefUnwindSafe for WordBoundaryConfig
impl Send for WordBoundaryConfig
impl Sync for WordBoundaryConfig
impl Unpin for WordBoundaryConfig
impl UnsafeUnpin for WordBoundaryConfig
impl UnwindSafe for WordBoundaryConfig
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