from_lexical_with_options

Macro from_lexical_with_options 

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

Define the FromLexicalWithOptions 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.
  • ops_t: The options type.

§Examples

from_lexical_with_options!("lexical_core", 1234, u64, 4, ParseIntegerOptions);