#[non_exhaustive]pub enum TypedError<'src> {
ParameterDuplicated {
parameter: ParameterKind<Segments<'src>>,
span: Span,
},
ParameterMultipleValuesDisallowed {
parameter: ParameterKind<Segments<'src>>,
span: Span,
},
ParameterValueMustBeQuoted {
parameter: ParameterKind<Segments<'src>>,
value: Segments<'src>,
span: Span,
},
ParameterValueMustNotBeQuoted {
parameter: ParameterKind<Segments<'src>>,
value: Segments<'src>,
span: Span,
},
ParameterValueInvalid {
parameter: ParameterKind<Segments<'src>>,
value: Segments<'src>,
span: Span,
},
ValueTypeDisallowed {
property: PropertyKind<Segments<'src>>,
value_type: ValueType<Segments<'src>>,
expected_types: &'static [ValueType<String>],
span: Span,
},
ValueSyntax {
value: Segments<'src>,
err: Rich<'src, char>,
},
PropertyUnexpectedKind {
expected: PropertyKind<Segments<'src>>,
found: PropertyKind<Segments<'src>>,
span: Span,
},
PropertyMissingValue {
property: PropertyKind<Segments<'src>>,
span: Span,
},
PropertyInvalidValueCount {
property: PropertyKind<Segments<'src>>,
expected: usize,
found: usize,
span: Span,
},
PropertyInvalidValue {
property: PropertyKind<Segments<'src>>,
value: String,
span: Span,
},
PropertyUnexpectedValue {
property: PropertyKind<Segments<'src>>,
expected: &'static [ValueType<String>],
found: ValueType<Segments<'src>>,
span: Span,
},
}Expand description
Errors that can occur during typed analysis of iCalendar components.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ParameterDuplicated
Parameter occurs multiple times when only one is allowed.
ParameterMultipleValuesDisallowed
Parameter does not allow multiple values.
ParameterValueMustBeQuoted
Parameter value must be quoted.
Fields
parameter: ParameterKind<Segments<'src>>The parameter name
ParameterValueMustNotBeQuoted
Parameter value must not be quoted.
Fields
parameter: ParameterKind<Segments<'src>>The parameter name
ParameterValueInvalid
Invalid parameter value.
Fields
parameter: ParameterKind<Segments<'src>>The parameter name
ValueTypeDisallowed
Value type is not allowed for this property.
Fields
property: PropertyKind<Segments<'src>>The property name
ValueSyntax
Syntax error in property value.
PropertyUnexpectedKind
Property kind does not match the expected type.
Fields
expected: PropertyKind<Segments<'src>>Expected property kind
found: PropertyKind<Segments<'src>>Actual property kind found
PropertyMissingValue
Property has no values when at least one is required.
Fields
property: PropertyKind<Segments<'src>>The property that is missing values
PropertyInvalidValueCount
Property has an invalid value count.
Fields
property: PropertyKind<Segments<'src>>The property kind
PropertyInvalidValue
Property value is invalid or out of allowed range.
Fields
property: PropertyKind<Segments<'src>>The property that has the invalid value
PropertyUnexpectedValue
Property value has unexpected type.
Implementations§
Trait Implementations§
Source§impl<'src> Clone for TypedError<'src>
impl<'src> Clone for TypedError<'src>
Source§fn clone(&self) -> TypedError<'src>
fn clone(&self) -> TypedError<'src>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'src> Debug for TypedError<'src>
impl<'src> Debug for TypedError<'src>
Source§impl<'src> Display for TypedError<'src>
impl<'src> Display for TypedError<'src>
Source§impl<'src> Error for TypedError<'src>
impl<'src> Error for TypedError<'src>
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
Auto Trait Implementations§
impl<'src> Freeze for TypedError<'src>
impl<'src> RefUnwindSafe for TypedError<'src>
impl<'src> Send for TypedError<'src>
impl<'src> Sync for TypedError<'src>
impl<'src> Unpin for TypedError<'src>
impl<'src> UnwindSafe for TypedError<'src>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
Source§impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
impl<T, S> SpanWrap<S> for Twhere
S: WrappingSpan<T>,
Source§fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
fn with_span(self, span: S) -> <S as WrappingSpan<Self>>::Spanned
WrappingSpan::make_wrapped to wrap an AST node in a span.