pub enum Error {
UnknownType(TypeIdent),
ExpectedUnion(TypeIdent),
ExpectedComplexChoice(TypeIdent),
ExpectedComplexType(TypeIdent),
MissingContentType(TypeIdent),
ExpectedChoiceContent(TypeIdent),
ExpectedUnboundContent(TypeIdent),
UnexpectedContentType(TypeIdent),
UnexpectedElementInContent(TypeIdent),
Custom(String),
}Expand description
Error that is raised by the Optimizer.
Variants§
UnknownType(TypeIdent)
Unknown type identifier.
Is raised if a specific identifier could not be resolved to it’s corresponding type information.
ExpectedUnion(TypeIdent)
The type is not a union type.
Is raised if a type is expected to be a union, but it is not.
ExpectedComplexChoice(TypeIdent)
The type is not a complex choice type.
Is raised if a type is expected to be a complex choice, but it is not.
ExpectedComplexType(TypeIdent)
The type is not a complex type.
Is raised if a type is expected to be a complex type, but it is not.
MissingContentType(TypeIdent)
The complex type is missing a content type.
Is raised if the content type of a complex type could not be resolved.
ExpectedChoiceContent(TypeIdent)
The complex type is expected to have a choice content.
Is raised if the content type of a complex type it not a choice.
ExpectedUnboundContent(TypeIdent)
The complex type is expected to have content with MaxOccurs::Unbounded.
Is raised if the content of a complex type does nor have unbounded occurrence.
UnexpectedContentType(TypeIdent)
The complex type has an unexpected content type.
Is raised if the content type of a complex type does not match the expectations.
UnexpectedElementInContent(TypeIdent)
The complex type contains an unexpected element in it’s content type.
Is raised if any element of the content of a complex type does not match the expectations.
Custom(String)
Custom Error
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.