pub enum NamespaceError {
Empty,
TooLong {
max: usize,
},
InvalidCharacter {
ch: char,
},
EmptySegment,
TrailingSeparator,
}Expand description
Validation error returned when a namespace string is rejected.
Variants§
Empty
The input was empty.
TooLong
The input exceeded the maximum allowed length.
InvalidCharacter
The input contained a character outside [a-zA-Z0-9\-_.].
EmptySegment
A ::-separated segment was empty.
TrailingSeparator
The input ended with a : separator.
Trait Implementations§
Source§impl Clone for NamespaceError
impl Clone for NamespaceError
Source§fn clone(&self) -> NamespaceError
fn clone(&self) -> NamespaceError
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 NamespaceError
impl Debug for NamespaceError
Source§impl Display for NamespaceError
impl Display for NamespaceError
impl Eq for NamespaceError
Source§impl Error for NamespaceError
Available on crate feature std only.
impl Error for NamespaceError
Available on crate feature
std only.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()
Source§impl From<NamespaceError> for TypeError
impl From<NamespaceError> for TypeError
Source§fn from(e: NamespaceError) -> Self
fn from(e: NamespaceError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NamespaceError
impl PartialEq for NamespaceError
Source§fn eq(&self, other: &NamespaceError) -> bool
fn eq(&self, other: &NamespaceError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NamespaceError
Auto Trait Implementations§
impl Freeze for NamespaceError
impl RefUnwindSafe for NamespaceError
impl Send for NamespaceError
impl Sync for NamespaceError
impl Unpin for NamespaceError
impl UnsafeUnpin for NamespaceError
impl UnwindSafe for NamespaceError
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