logos.lang.num.error
Module lang · package logos-lang
Types
enumFloatErrorKind
enum FloatErrorKind
Classifies why float parsing failed.
Rust’s equivalent enum is private; exposed here so callers can branch on it.
Variants
Empty
Invalid
enumIntErrorKind
enum IntErrorKind
Classifies why integer parsing or a narrowing integer conversion failed.
Same variants as Rust’s core::num::IntErrorKind.
Variants
Empty
InvalidDigit
NegOverflow
PosOverflow
Zero
structParseFloatError
struct ParseFloatError
Represents a failed float parse; returned by f32::from_str / f64::from_str.
Implements: Error
Fields
kind: FloatErrorKind
Classifies the failure.
Methods
fn new(kind: FloatErrorKind) -> ParseFloatError
Creates a ParseFloatError with the given kind.
fn source(self: &ParseFloatError) -> Option
structParseIntError
struct ParseIntError
Represents a failed integer parse; returned by i32::from_str_radix / from_ascii / etc.
Implements: Error
Fields
kind: IntErrorKind
Classifies the failure.
Methods
fn new(kind: IntErrorKind) -> ParseIntError
Creates a ParseIntError with the given kind.
fn source(self: &ParseIntError) -> Option
structTryFromIntError
struct TryFromIntError
Represents a failed try_from integer conversion: the value did not fit the target type.
Unlike Rust’s opaque core::num::TryFromIntError, the kind is public.
Implements: Error
Fields
kind: IntErrorKind
Classifies the failure.
Methods
fn new(kind: IntErrorKind) -> TryFromIntError
Creates a TryFromIntError with the given kind.
fn source(self: &TryFromIntError) -> Option