#[non_exhaustive]pub enum NumericFormatError {
Show 14 variants
FormatTooLong {
byte_offset: usize,
length: usize,
maximum: usize,
},
InteriorNul {
byte_offset: usize,
},
UnterminatedDirective {
byte_offset: usize,
},
MultipleConversions {
byte_offset: usize,
},
DynamicArgument {
byte_offset: usize,
},
PositionalArgument {
byte_offset: usize,
},
UnsupportedFlag {
byte_offset: usize,
flag: char,
},
IncompatibleFlag {
byte_offset: usize,
flag: char,
conversion: char,
},
WidthTooLarge {
byte_offset: usize,
width: u32,
maximum: u32,
},
PrecisionTooLarge {
byte_offset: usize,
precision: u32,
maximum: u32,
},
UnsupportedLength {
byte_offset: usize,
},
UnsupportedConversion {
byte_offset: usize,
conversion: char,
},
TypeMismatch {
byte_offset: usize,
},
DirectiveTooLong {
byte_offset: usize,
length: usize,
},
}Expand description
Describes why a C-style numeric format was rejected.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FormatTooLong
The complete UTF-8 format exceeds the bounded native parsing contract.
InteriorNul
The string contains a NUL byte and cannot be passed as one C string.
UnterminatedDirective
A % directive is incomplete.
MultipleConversions
More than one directive would consume a value argument.
DynamicArgument
* requests another variadic width or precision argument.
PositionalArgument
A positional argument such as %1$d was requested.
UnsupportedFlag
The directive uses a non-portable or unsupported flag.
IncompatibleFlag
The flag is defined for printf but not for this numeric conversion.
WidthTooLarge
The requested field width exceeds the bounded native parsing contract.
PrecisionTooLarge
The requested precision exceeds the bounded native parsing contract.
UnsupportedLength
The directive uses a length modifier that does not match the C carrier type.
UnsupportedConversion
The directive is not a supported numeric conversion.
TypeMismatch
The conversion is numeric but does not match the signedness or category of T.
DirectiveTooLong
Dear ImGui copies directives into a fixed 32-byte stack buffer.
Implementations§
Source§impl NumericFormatError
impl NumericFormatError
Sourcepub fn byte_offset(&self) -> usize
pub fn byte_offset(&self) -> usize
Returns the byte offset where validation failed.
Trait Implementations§
Source§impl Clone for NumericFormatError
impl Clone for NumericFormatError
Source§fn clone(&self) -> NumericFormatError
fn clone(&self) -> NumericFormatError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NumericFormatError
impl Debug for NumericFormatError
Source§impl Display for NumericFormatError
impl Display for NumericFormatError
impl Eq for NumericFormatError
Source§impl Error for NumericFormatError
impl Error for NumericFormatError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()