Trait NumLiteral

Source
pub trait NumLiteral:
    'static
    + Clone
    + Debug {
    // Required method
    fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>;
}
Expand description

Numeric literal used in NumGrammars.

Required Methods§

Source

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Tries to parse a literal.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl NumLiteral for f32

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for f64

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for i8

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for i16

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for i32

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for i64

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for i128

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for u8

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for u16

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for u32

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for u64

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for u128

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for BigInt

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for BigUint

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for Complex32

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Source§

impl NumLiteral for Complex64

Source§

fn parse(input: InputSpan<'_>) -> NomResult<'_, Self>

Implementors§