pub enum Error {
Show 14 variants
TypeAlreadyDefined(Ident),
ExpectedDynamicElement(Ident),
UnknownType(Ident),
UnknownElement(Ident),
UnknownAttribute(String),
UnknownNamespace(Namespace),
UnknownNamespacePrefix(NamespacePrefix),
InvalidValue(&'static str),
InvalidLocalName(RawByteStr),
GroupMissingRef,
AttributeGroupMissingRef,
InvalidAttributeReference(Box<AttributeType>),
NoType,
ExpectedGroupType,
}
Expand description
error raised by the Interpreter
.
Variants§
TypeAlreadyDefined(Ident)
Type has already been defined.
Is raised if a new type with an already existing identifier is added
to the MetaTypes
structure.
ExpectedDynamicElement(Ident)
Expected dynamic element.
Expected the specified element to be dynamic because it is referenced as substitution group.
UnknownType(Ident)
Unknown type.
Is raised if a type identifier could not been resolved to the actual type information.
UnknownElement(Ident)
Unknown element.
Is raised if an element referenced inside the XML schema could not be resolved.
UnknownAttribute(String)
Unknown attribute.
Is raised if an attribute referenced inside the XML schema could not be resolved.
UnknownNamespace(Namespace)
Unknown namespace.
Is raised if the namespace URI could not be resolved.
UnknownNamespacePrefix(NamespacePrefix)
Unknown namespace prefix.
Is raised if the namespace prefix could not be resolved.
InvalidValue(&'static str)
Invalid value.
Is raised if a value from the XML schema is malformed or invalid.
InvalidLocalName(RawByteStr)
Invalid local name.
Is raised if conversion from a raw local name to a string has failed.
GroupMissingRef
Group is missing the ref
attribute
Is raised if a group reference in the XML schema is missing the ref
attribute.
AttributeGroupMissingRef
Attribute group is missing the ref
attribute
Is raised if a attribute group reference in the XML schema is missing the ref
attribute.
InvalidAttributeReference(Box<AttributeType>)
Invalid attribute reference.
The attribute specified in the schema is missing some information.
NoType
Unable to create type information.
Is raised if the interpreter was not able to generate a Type
from the
provided schema information.
ExpectedGroupType
The interpreter expected a group type (like xs:all
, xs:choice
or xs:sequence
).
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 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<X> SerializeBytes for Xwhere
X: ToString,
impl<X> SerializeBytes for Xwhere
X: ToString,
Source§impl<X> SerializeSync for Xwhere
X: WithSerializer,
impl<X> SerializeSync for Xwhere
X: WithSerializer,
Source§impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
impl<X> WithBoxedSerializer for Xwhere
X: WithSerializer,
Source§impl<X> WithSerializer for Xwhere
X: SerializeBytes + Debug,
impl<X> WithSerializer for Xwhere
X: SerializeBytes + Debug,
Source§type Serializer<'x> = ContentSerializer<'x, X>
where
X: 'x
type Serializer<'x> = ContentSerializer<'x, X> where X: 'x
Source§fn serializer<'ser>(
&'ser self,
name: Option<&'ser str>,
is_root: bool,
) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
fn serializer<'ser>( &'ser self, name: Option<&'ser str>, is_root: bool, ) -> Result<<X as WithSerializer>::Serializer<'ser>, Error>
value
. Read more