pub enum TomlError {
Null(NullInToml),
Integer(IntegerOutOfRange),
Datetime(BadDatetime),
}Expand description
Why a document could not be converted to TOML.
Deliberately no #[from] and no #[source] on either variant: a generated
source() would be a second copy of a message the variant’s own Display
already prints in full, and knf-cli walks the cause chain onto stderr.
Variants§
Null(NullInToml)
The document contains a null, which TOML cannot represent.
Integer(IntegerOutOfRange)
The document contains an integer above i64::MAX.
Datetime(BadDatetime)
The document contains a datetime whose spelling does not parse.
Trait Implementations§
Source§impl Error for TomlError
impl Error for TomlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for TomlError
impl RefUnwindSafe for TomlError
impl Send for TomlError
impl Sync for TomlError
impl Unpin for TomlError
impl UnsafeUnpin for TomlError
impl UnwindSafe for TomlError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more