pub enum Lit {
Char(LitChar),
String(LitString),
Float(LitFloat),
Int(LitInt),
}Expand description
A literal.
Variants§
Char(LitChar)
A character literal.
String(LitString)
A string literal.
Float(LitFloat)
A floating-point literal.
Int(LitInt)
An integer literal.
Implementations§
Source§impl Lit
impl Lit
Sourcepub fn parse<I, C>(input: &[I]) -> IResult<&[I], Self>where
I: Debug + InputTake + InputLength + Slice<RangeFrom<usize>> + Slice<RangeTo<usize>> + InputIter<Item = C> + Clone + InputTakeAtPosition<Item = C> + Compare<&'static str> + Offset + ParseTo<f32> + ParseTo<f64> + FindSubstring<&'static str>,
C: AsChar + Copy,
&'static str: FindToken<<I as InputIter>::Item>,
pub fn parse<I, C>(input: &[I]) -> IResult<&[I], Self>where
I: Debug + InputTake + InputLength + Slice<RangeFrom<usize>> + Slice<RangeTo<usize>> + InputIter<Item = C> + Clone + InputTakeAtPosition<Item = C> + Compare<&'static str> + Offset + ParseTo<f32> + ParseTo<f64> + FindSubstring<&'static str>,
C: AsChar + Copy,
&'static str: FindToken<<I as InputIter>::Item>,
Parse a literal.
Trait Implementations§
impl Eq for Lit
impl StructuralPartialEq for Lit
Auto Trait Implementations§
impl Freeze for Lit
impl RefUnwindSafe for Lit
impl Send for Lit
impl Sync for Lit
impl Unpin for Lit
impl UnsafeUnpin for Lit
impl UnwindSafe for Lit
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