pub enum Literal {
Primitive(Primitive),
String(Symbol),
Symbol(Symbol),
Regex(RegexLiteral),
}Expand description
A literal value.
Variants§
Primitive(Primitive)
String(Symbol)
A string literal.
Symbol(Symbol)
A symbol literal (:foo).
Regex(RegexLiteral)
A regular expression literal.
Trait Implementations§
source§impl TokenizeRanged for Literal
impl TokenizeRanged for Literal
source§fn tokenize_ranged(
&self,
range: SourceRange,
tokens: &mut VecDeque<Ranged<Token>>,
)
fn tokenize_ranged( &self, range: SourceRange, tokens: &mut VecDeque<Ranged<Token>>, )
Tokenize
self into tokens within the enclosing range.source§impl TryFrom<Literal> for ValueOrSource
impl TryFrom<Literal> for ValueOrSource
impl StructuralPartialEq for Literal
Auto Trait Implementations§
impl Freeze for Literal
impl RefUnwindSafe for Literal
impl Send for Literal
impl Sync for Literal
impl Unpin for Literal
impl UnwindSafe for Literal
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
§impl<A> Cast for A
impl<A> Cast for A
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)