pub enum IcalValidateError {
PropVersion {
prop: String,
version: IcalVersion,
},
MissingProp {
component: String,
prop: IcalPropKind,
},
ValueKind {
prop: IcalPropKind,
kind: IcalValueKind,
},
ParamNotAllowed {
prop: IcalPropKind,
param: IcalParamKind,
},
TooMany {
component: String,
prop: IcalPropKind,
count: usize,
},
Nesting {
parent: String,
child: IcalComponentKind,
},
Rule {
prop: IcalPropKind,
problem: IcalRecurRuleProblem,
},
}parser only.Expand description
A single conformance failure found by Ical::validate.
Variants§
PropVersion
A property appears in a version that does not define it.
MissingProp
A component is missing a property its spec requires.
ValueKind
A property carries a value of a kind its spec does not allow for the version.
Fields
prop: IcalPropKindThe offending property name.
kind: IcalValueKindThe kind the value actually has.
ParamNotAllowed
A property carries a known parameter its spec does not allow for the version. An extension parameter always passes.
Fields
prop: IcalPropKindThe offending property name.
param: IcalParamKindThe parameter that may not appear on it.
TooMany
A property appears more times than its cardinality permits.
Only the “too many” direction: a property that is absent when it should
be there is a MissingProp, since whether a
property is required depends on the component it sits in and the
cardinality does not.
Fields
prop: IcalPropKindThe repeated property.
Nesting
A component nests a child its spec does not allow.
Rule
A recurrence rule breaks one of the RFC 5545 3.3.10 constraints.
Fields
prop: IcalPropKindThe property carrying the rule (RRULE or EXRULE).
problem: IcalRecurRuleProblemWhat is wrong with it.
Trait Implementations§
Source§impl Clone for IcalValidateError
impl Clone for IcalValidateError
Source§fn clone(&self) -> IcalValidateError
fn clone(&self) -> IcalValidateError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IcalValidateError
impl Debug for IcalValidateError
Source§impl Display for IcalValidateError
impl Display for IcalValidateError
impl Eq for IcalValidateError
Source§impl Error for IcalValidateError
impl Error for IcalValidateError
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()