to_lexical

Macro to_lexical 

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

Define the ToLexical 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.

§Examples

to_lexical!("lexical_core", 1234, u64);