from_lexical

Macro from_lexical 

Source
macro_rules! from_lexical {
    ($name:literal, $value:literal, $t:ty, $len:literal $(, #[$attr:meta])? $(,)?) => { ... };
}
Available on crate features parse-floats or parse-integers only.
Expand description

Define the FromLexical trait.

  • name: The name of the crate calling the function.
  • value: A numerical value to use for the example.
  • t: The type of the number for the example.
  • len: The length of the string form of value.

§Examples

from_lexical!("lexical_core", 1234, u64, 4);