pub enum Error {
Cdr(Set<WarningKind>),
Parse(ParseError),
DimensionShouldHaveVolume {
dimension_name: &'static str,
},
DurationOverflow,
Internal(Box<dyn Error + Send + Sync + 'static>),
NoValidTariff,
Tariff(Set<WarningKind>),
}Expand description
Possible errors when pricing a charge session.
Variants§
Cdr(Set<WarningKind>)
An error occurred while parsing a CDR.
Parse(ParseError)
An error occurred while deserializing a CDR or tariff.
DimensionShouldHaveVolume
The given dimension should have a volume
DurationOverflow
A numeric overflow occurred while creating a duration.
Internal(Box<dyn Error + Send + Sync + 'static>)
An internal programming error.
NoValidTariff
No valid tariff has been found in the list of provided tariffs. The tariff list can be sourced from either the tariffs contained in the CDR or from a list provided by the caller.
A valid tariff must have a start date-time before the start of the session and an end date-time after the start of the session.
If the CDR does not contain any tariffs consider providing a them using TariffSource
when calling cdr::price.
Tariff(Set<WarningKind>)
Converting the tariff::Versioned into a structured tariff::v221::Tariff caused an
unrecoverable error.