pub struct ByteClasses { /* private fields */ }Expand description
Dialect-owned byte-class data for the tokenizer hot loop.
Implementations§
Source§impl ByteClasses
impl ByteClasses
Sourcepub const STANDARD: Self
pub const STANDARD: Self
Standard M1 byte classes: the ANSI baseline shared by every preset except
PostgreSQL/MySQL (which layer the vertical tab as full whitespace) and
SQLite/DuckDB (which layer their measured position-dependent vertical-tab
rules — see SQLITE_BYTE_CLASSES / DUCKDB_BYTE_CLASSES).
Sourcepub const fn byte_class(&self, byte: u8) -> u8
pub const fn byte_class(&self, byte: u8) -> u8
Return all classes for byte.
Sourcepub const fn has_class(&self, byte: u8, mask: u8) -> bool
pub const fn has_class(&self, byte: u8, mask: u8) -> bool
Return true if byte has any class in mask.
Sourcepub const fn has_boundary_whitespace(&self) -> bool
pub const fn has_boundary_whitespace(&self) -> bool
Whether any byte carries CLASS_WHITESPACE_BOUNDARY — the tokenizer’s cheap
gate for the interior-boundary guard (true only for the DuckDB preset).
Sourcepub const fn with_class(self, byte: u8, mask: u8) -> Self
pub const fn with_class(self, byte: u8, mask: u8) -> Self
Return a copy with mask added to byte.
Trait Implementations§
Source§impl Clone for ByteClasses
impl Clone for ByteClasses
Source§fn clone(&self) -> ByteClasses
fn clone(&self) -> ByteClasses
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 moreimpl Copy for ByteClasses
Source§impl Debug for ByteClasses
impl Debug for ByteClasses
impl Eq for ByteClasses
Source§impl PartialEq for ByteClasses
impl PartialEq for ByteClasses
impl StructuralPartialEq for ByteClasses
Auto Trait Implementations§
impl Freeze for ByteClasses
impl RefUnwindSafe for ByteClasses
impl Send for ByteClasses
impl Sync for ByteClasses
impl Unpin for ByteClasses
impl UnsafeUnpin for ByteClasses
impl UnwindSafe for ByteClasses
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