pub struct BadDatetime { /* private fields */ }Expand description
A Value::Datetime carrying text that is not a TOML datetime.
Unreachable from a parsed document, and unreachable from this crate’s own
pipeline: a datetime only ever originates in the TOML parser, and neither
${env:...} nor the CLI’s --set can make one, since both type their values
through JSON, which has no datetime. It is reachable from a caller that
builds a Value by hand, though — the variant is an ordinary public one
holding an ordinary String — and this is what that caller gets instead of a
panic. The rule it reports on is unchanged: nothing may synthesize a datetime
from text.
Carries paths and the offending spelling, and like NullInToml stops short
of a trailing newline so an interface can append a line of its own. There is no
flag that would help here, so no interface has one to append.
Trait Implementations§
Source§impl Debug for BadDatetime
impl Debug for BadDatetime
Source§impl Display for BadDatetime
impl Display for BadDatetime
Source§impl Error for BadDatetime
impl Error for BadDatetime
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()