pub enum DatumCharClass {
Content,
Whitespace,
Newline,
LineComment,
String,
ListStart,
ListEnd,
SpecialID,
Sign,
Digit,
}Expand description
Datum character class.
Variants§
Content
Escaped characters, anything else
Whitespace
32 and 9
Newline
10
LineComment
‘;’
String
‘“’
ListStart
‘(’
ListEnd
‘)’
SpecialID
‘#’
Sign
‘-’
Digit
‘0’ - ‘9’
Implementations§
Source§impl DatumCharClass
impl DatumCharClass
Sourcepub const fn potential_identifier(&self) -> bool
pub const fn potential_identifier(&self) -> bool
If this character class is a potential identifier. Note that this can be accessed via DatumChar via DatumChar::deref.
use datum::DatumChar;
assert!(DatumChar::identify('a').expect("not backslash").potential_identifier());Sourcepub const fn numeric_start(&self) -> bool
pub const fn numeric_start(&self) -> bool
If this character class starts a number. Note that this can be accessed via DatumChar via DatumChar::deref.
use datum::DatumChar;
assert!(DatumChar::identify('0').expect("not backslash").numeric_start());Trait Implementations§
Source§impl Clone for DatumCharClass
impl Clone for DatumCharClass
Source§fn clone(&self) -> DatumCharClass
fn clone(&self) -> DatumCharClass
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 DatumCharClass
Source§impl Debug for DatumCharClass
impl Debug for DatumCharClass
impl Eq for DatumCharClass
Source§impl PartialEq for DatumCharClass
impl PartialEq for DatumCharClass
Source§fn eq(&self, other: &DatumCharClass) -> bool
fn eq(&self, other: &DatumCharClass) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for DatumCharClass
Auto Trait Implementations§
impl Freeze for DatumCharClass
impl RefUnwindSafe for DatumCharClass
impl Send for DatumCharClass
impl Sync for DatumCharClass
impl Unpin for DatumCharClass
impl UnsafeUnpin for DatumCharClass
impl UnwindSafe for DatumCharClass
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