pub struct KeywordSpec { /* private fields */ }Expand description
A vim-style iskeyword spec parsed once into its tokens.
The spec (e.g. "@,48-57,_,192-255") changes only when the
option is set, but word motions classify every stepped-over char.
Pre-parsing with KeywordSpec::parse and reusing it via
KeywordSpec::matches avoids re-splitting/re-parsing the spec
string on every character. The boolean result is identical to
calling is_keyword_char with the same spec string.
Implementations§
Source§impl KeywordSpec
impl KeywordSpec
Trait Implementations§
Source§impl Clone for KeywordSpec
impl Clone for KeywordSpec
Source§fn clone(&self) -> KeywordSpec
fn clone(&self) -> KeywordSpec
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 KeywordSpec
impl Debug for KeywordSpec
Source§impl Default for KeywordSpec
impl Default for KeywordSpec
Source§fn default() -> KeywordSpec
fn default() -> KeywordSpec
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for KeywordSpec
impl RefUnwindSafe for KeywordSpec
impl Send for KeywordSpec
impl Sync for KeywordSpec
impl Unpin for KeywordSpec
impl UnsafeUnpin for KeywordSpec
impl UnwindSafe for KeywordSpec
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