pub enum VcardValidateError {
PropVersion {
prop: VcardPropKind,
version: VcardVersion,
},
ValueKind {
prop: VcardPropKind,
found: Option<VcardValueKind>,
},
Param {
prop: VcardPropKind,
param: VcardParamKind,
},
Value {
prop: VcardPropKind,
found: String,
},
ParamValue {
param: VcardParamKind,
found: String,
},
Cardinality {
prop: VcardPropKind,
cardinality: VcardPropCardinality,
count: usize,
},
}Expand description
A way a known property breaks its RFC 6350 contract for the card version.
Variants§
PropVersion
The property is not defined in this version.
ValueKind
The value kind is not allowed for the property (a None is an undecoded
value on a known property).
Fields
prop: VcardPropKindThe offending property.
found: Option<VcardValueKind>The value kind found, if any.
Param
The parameter is not allowed for the property in this version.
Value
The value holds something the property’s own definition forbids.
Only the few properties whose RFC closes their content raise this:
GENDER’s sex code, PROFILE’s single value, CLIENTPIDMAP’s
identifier. A vocabulary ending in iana-token / x-name is open,
and nothing to check against.
Fields
prop: VcardPropKindThe offending property.
ParamValue
The parameter’s value is outside what the parameter accepts.
PREF outside 1 to 100, a PID that is not a small integer or a
pair of them, a DERIVED that is neither true nor false.
Fields
param: VcardParamKindThe offending parameter.
Cardinality
The property appears a number of times its multiplicity forbids.
Fields
prop: VcardPropKindThe offending property.
cardinality: VcardPropCardinalityThe required multiplicity.
Trait Implementations§
Source§impl Clone for VcardValidateError
impl Clone for VcardValidateError
Source§fn clone(&self) -> VcardValidateError
fn clone(&self) -> VcardValidateError
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 VcardValidateError
impl Debug for VcardValidateError
Source§impl Display for VcardValidateError
impl Display for VcardValidateError
impl Eq for VcardValidateError
Source§impl Error for VcardValidateError
impl Error for VcardValidateError
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()