pub enum MarkupError {
EmptyName {},
UnmappedPrefix {
prefix: String,
},
BadName {
name: String,
},
}Expand description
An error representing a tag or name issue when building HML markup; this is not specifically related to a parsing position (indeed, these errors can be generated by using the HML name subsystem without any parsing).
Variants§
EmptyName
An empty name was provided, which is illegal
UnmappedPrefix
Use of an unmapped prefix / namespace
BadName
Indicates a bad name (such as a:b:c)
Implementations§
Source§impl MarkupError
impl MarkupError
Sourcepub fn empty_name() -> Self
pub fn empty_name() -> Self
An ‘empty’ name was provided; names must always contain some characters; create the appropriate error
Sourcepub fn unmapped_prefix(prefix: &str) -> Self
pub fn unmapped_prefix(prefix: &str) -> Self
Create a MarkupError for a specific namespace prefix that has not been mapped in the hierarchy of the document to this point
Sourcepub fn bad_name(name: &str) -> Self
pub fn bad_name(name: &str) -> Self
Create a MarkupError for a malformed name (such as a:b:c)
Trait Implementations§
Source§impl Debug for MarkupError
impl Debug for MarkupError
Source§impl Display for MarkupError
impl Display for MarkupError
Source§impl Error for MarkupError
impl Error for MarkupError
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 MarkupError
impl RefUnwindSafe for MarkupError
impl Send for MarkupError
impl Sync for MarkupError
impl Unpin for MarkupError
impl UnsafeUnpin for MarkupError
impl UnwindSafe for MarkupError
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