pub enum SegmentError {
Empty,
Dot,
DotDot,
ContainsSeparator,
ContainsForbidden {
c: char,
category: ForbiddenCategory,
},
}Expand description
Error produced when constructing a PathSegment.
Each variant maps to a sub-clause of PATH-002.
Variants§
Empty
Violates PATH-002: the input is empty.
Dot
Violates PATH-002: the input is the literal ..
DotDot
Violates PATH-002: the input is the literal ...
ContainsSeparator
Violates PATH-002: the input contains the path separator /.
ContainsForbidden
Violates PATH-002: the input contains a codepoint in a
forbidden Unicode General Category (see
ForbiddenCategory).
Fields
§
category: ForbiddenCategoryThe Unicode General Category that disqualifies it.
Trait Implementations§
Source§impl Clone for SegmentError
impl Clone for SegmentError
Source§impl Debug for SegmentError
impl Debug for SegmentError
Source§impl Display for SegmentError
impl Display for SegmentError
impl Eq for SegmentError
Source§impl Error for SegmentError
impl Error for SegmentError
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 ErrorCompat for SegmentError
impl ErrorCompat for SegmentError
Source§fn iter_chain(&self) -> ChainCompat<'_, '_> ⓘwhere
Self: AsErrorSource,
fn iter_chain(&self) -> ChainCompat<'_, '_> ⓘwhere
Self: AsErrorSource,
Returns an iterator for traversing the chain of errors,
starting with the current error
and continuing with recursive calls to
Error::source. Read moreSource§impl PartialEq for SegmentError
impl PartialEq for SegmentError
impl StructuralPartialEq for SegmentError
Auto Trait Implementations§
impl Freeze for SegmentError
impl RefUnwindSafe for SegmentError
impl Send for SegmentError
impl Sync for SegmentError
impl Unpin for SegmentError
impl UnsafeUnpin for SegmentError
impl UnwindSafe for SegmentError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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