#[non_exhaustive]pub struct TokenizeOptions {
pub time_limit_millis: u64,
pub max_line_length: usize,
pub include_token_type: bool,
pub include_scopes: bool,
pub preserve_scope_boundaries: bool,
}Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.time_limit_millis: u64Best-effort per-line budget in milliseconds. Ferriki checks it between
tokenizer matching passes and after each synchronous pass returns; a
regex search cannot be interrupted and may run past the budget. 0
disables the time limit.
max_line_length: usize§include_token_type: bool§include_scopes: bool§preserve_scope_boundaries: boolRetains grammar boundaries even when adjacent tokens have equal styles.
Implementations§
Source§impl TokenizeOptions
impl TokenizeOptions
Sourcepub fn with_time_limit_millis(self, value: u64) -> Self
pub fn with_time_limit_millis(self, value: u64) -> Self
Sets time_limit_millis.
Sourcepub fn with_max_line_length(self, value: usize) -> Self
pub fn with_max_line_length(self, value: usize) -> Self
Sets max_line_length.
Sourcepub fn with_include_token_type(self, value: bool) -> Self
pub fn with_include_token_type(self, value: bool) -> Self
Sets include_token_type.
Sourcepub fn with_preserve_scope_boundaries(self, value: bool) -> Self
pub fn with_preserve_scope_boundaries(self, value: bool) -> Self
Retains full scope paths and theme-independent grammar boundaries.
Sourcepub fn with_include_scopes(self, value: bool) -> Self
pub fn with_include_scopes(self, value: bool) -> Self
Sets include_scopes.
Trait Implementations§
Source§impl Clone for TokenizeOptions
impl Clone for TokenizeOptions
Source§impl Debug for TokenizeOptions
impl Debug for TokenizeOptions
Source§impl Default for TokenizeOptions
impl Default for TokenizeOptions
impl Eq for TokenizeOptions
Source§impl PartialEq for TokenizeOptions
impl PartialEq for TokenizeOptions
impl StructuralPartialEq for TokenizeOptions
Auto Trait Implementations§
impl Freeze for TokenizeOptions
impl RefUnwindSafe for TokenizeOptions
impl Send for TokenizeOptions
impl Sync for TokenizeOptions
impl Unpin for TokenizeOptions
impl UnsafeUnpin for TokenizeOptions
impl UnwindSafe for TokenizeOptions
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