Available on crate feature
write-integers
only.Expand description
Configuration options for writing integers.
This currently has no functionality, since we do not support any features for writing integers at this time.
§Examples
use lexical_write_integer::{Options, ToLexicalWithOptions};
use lexical_write_integer::format::STANDARD;
const OPTIONS: Options = Options::builder()
.build_strict();
const BUFFER_SIZE: usize = OPTIONS.buffer_size_const::<u64, STANDARD>();
let mut buffer = [0u8; BUFFER_SIZE];
let value = 1234u64;
let digits = value.to_lexical_with_options::<STANDARD>(&mut buffer, &OPTIONS);
assert_eq!(str::from_utf8(digits), Ok("1234"));
Structs§
- Options
- Immutable options to customize writing integers.
- Options
Builder - Builder for
Options
.
Constants§
- STANDARD
- Standard number format.