pub enum PragmaValue {
Number(String),
Identifier(String),
String(String),
}Expand description
Parsed pragma value.
We distinguish between bare identifiers and quoted strings so the
per-pragma handler can reject ambiguous shapes (e.g. a future numeric
pragma can refuse '42' while accepting 42). Numbers are kept as
the raw lexeme so the handler can pick its own integer / float
parsing strategy.
Variants§
Number(String)
Numeric literal (with an optional leading - folded into the lexeme).
Identifier(String)
Bare identifier, e.g. OFF / NONE / WAL.
String(String)
Quoted string literal, e.g. 'OFF' or "NONE".
Trait Implementations§
Source§impl Clone for PragmaValue
impl Clone for PragmaValue
Source§fn clone(&self) -> PragmaValue
fn clone(&self) -> PragmaValue
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 PragmaValue
impl Debug for PragmaValue
Source§impl PartialEq for PragmaValue
impl PartialEq for PragmaValue
Source§fn eq(&self, other: &PragmaValue) -> bool
fn eq(&self, other: &PragmaValue) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PragmaValue
Auto Trait Implementations§
impl Freeze for PragmaValue
impl RefUnwindSafe for PragmaValue
impl Send for PragmaValue
impl Sync for PragmaValue
impl Unpin for PragmaValue
impl UnsafeUnpin for PragmaValue
impl UnwindSafe for PragmaValue
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