pub enum NfaCompileError {
UnresolvedGroupRef {
name: String,
location: Option<SourceRef>,
},
UnresolvedElementRef {
name: String,
location: Option<SourceRef>,
},
InvalidOccurrence {
min: u32,
max: u32,
location: Option<SourceRef>,
},
InvalidAllGroupContent {
location: Option<SourceRef>,
},
InvalidAllGroupOccurs {
reason: String,
location: Option<SourceRef>,
},
RecursionLimitExceeded {
location: Option<SourceRef>,
},
EmptyContentModel {
location: Option<SourceRef>,
},
}Expand description
Errors that can occur during NFA compilation
Variants§
UnresolvedGroupRef
Group reference could not be resolved
UnresolvedElementRef
Element reference could not be resolved
InvalidOccurrence
Invalid occurrence constraint (minOccurs > maxOccurs)
InvalidAllGroupContent
All-group contains invalid content (XSD 1.0 restriction)
InvalidAllGroupOccurs
All-group has invalid occurrence constraints (XSD 1.0 restriction)
RecursionLimitExceeded
Recursion limit exceeded during compilation
EmptyContentModel
Empty content model (no particles to compile)
Implementations§
Source§impl NfaCompileError
impl NfaCompileError
Sourcepub fn unresolved_group(
name: impl Into<String>,
location: Option<SourceRef>,
) -> Self
pub fn unresolved_group( name: impl Into<String>, location: Option<SourceRef>, ) -> Self
Create an unresolved group reference error
Sourcepub fn unresolved_element(
name: impl Into<String>,
location: Option<SourceRef>,
) -> Self
pub fn unresolved_element( name: impl Into<String>, location: Option<SourceRef>, ) -> Self
Create an unresolved element reference error
Sourcepub fn invalid_occurrence(
min: u32,
max: u32,
location: Option<SourceRef>,
) -> Self
pub fn invalid_occurrence( min: u32, max: u32, location: Option<SourceRef>, ) -> Self
Create an invalid occurrence error
Sourcepub fn invalid_all_group(location: Option<SourceRef>) -> Self
pub fn invalid_all_group(location: Option<SourceRef>) -> Self
Create an invalid all-group content error
Sourcepub fn invalid_all_group_occurs(
reason: impl Into<String>,
location: Option<SourceRef>,
) -> Self
pub fn invalid_all_group_occurs( reason: impl Into<String>, location: Option<SourceRef>, ) -> Self
Create an invalid all-group occurrence error
Sourcepub fn recursion_exceeded(location: Option<SourceRef>) -> Self
pub fn recursion_exceeded(location: Option<SourceRef>) -> Self
Create a recursion limit exceeded error
Sourcepub fn empty_content(location: Option<SourceRef>) -> Self
pub fn empty_content(location: Option<SourceRef>) -> Self
Create an empty content model error
Trait Implementations§
Source§impl Clone for NfaCompileError
impl Clone for NfaCompileError
Source§fn clone(&self) -> NfaCompileError
fn clone(&self) -> NfaCompileError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NfaCompileError
impl Debug for NfaCompileError
Source§impl Display for NfaCompileError
impl Display for NfaCompileError
Source§impl Error for NfaCompileError
impl Error for NfaCompileError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for NfaCompileError
impl RefUnwindSafe for NfaCompileError
impl Send for NfaCompileError
impl Sync for NfaCompileError
impl Unpin for NfaCompileError
impl UnsafeUnpin for NfaCompileError
impl UnwindSafe for NfaCompileError
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
Mutably borrows from an owned value. Read more