pub enum Error {
InvalidYear,
ExpectedDate,
UnexpectedDate,
ExpectedTime,
UnexpectedTime,
ExpectedTimeZone,
UnexpectedTimeZone,
ExpectedUtcTimeZone,
UnableToCreateRustType,
}
Expand description
Error that can occur while transforming TomlDatetime
from and to
chrono
and time
types
Variants§
InvalidYear
Caused by years that cannot be represented in TomlDate::year
ExpectedDate
Caused by converting a TomlDatetime
without a date to a type
requiring a date component
UnexpectedDate
Caused by converting a TomlDatetime
with a date to a type
without a date component
ExpectedTime
Caused by converting a TomlDatetime
without a time to a type
requiring a time component
UnexpectedTime
Caused by converting a TomlDatetime
with a time to a type
without a time component
ExpectedTimeZone
Caused by converting a TomlDatetime
without a time zone to a type
requiring a time zone component
UnexpectedTimeZone
Caused by converting a TomlDatetime
with a time zone to a type
without a time zone component
ExpectedUtcTimeZone
Caused by converting a TomlDatetime
without the UTC time zone to a
type requiring UTC time zone
UnableToCreateRustType
Creating rust type failed due to the date time parsed by
TomlDatetime
being invalid
toml_datetime
should already validate this