pub enum PathPatternError {
EmptyInput,
EmptySegment,
OnlySlash,
TrailingSlash,
LiteralPath {
source: PathError,
},
InvalidGlobSegment {
segment: String,
position: usize,
source: GlobSegmentError,
},
NestedAlternation,
InvalidGlob {
message: String,
},
}Expand description
Error produced when parsing a PathPattern.
Variants§
EmptyInput
Violates PATH-002: the input is empty.
EmptySegment
Violates PATH-003: the input contains the empty
separator //.
OnlySlash
Violates PATH-003: the workspace-absolute pattern is the
single character / and has no segments.
TrailingSlash
Violates PATH-003: the input ends with /.
LiteralPath
The literal sub-form (PATH-001..PATH-007) failed.
InvalidGlobSegment
A glob segment failed validation.
Fields
§
source: GlobSegmentErrorUnderlying segment-level error.
NestedAlternation
Violates PATH-014: a brace-alternation block is nested
inside another brace-alternation block.
globset 0.4 accepts nested alternation, so the constraint
is enforced separately at parse time.
InvalidGlob
globset rejected the structural form of the pattern (for
example, an unclosed [).
Trait Implementations§
Source§impl Clone for PathPatternError
impl Clone for PathPatternError
Source§fn clone(&self) -> PathPatternError
fn clone(&self) -> PathPatternError
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 PathPatternError
impl Debug for PathPatternError
Source§impl Display for PathPatternError
impl Display for PathPatternError
Source§impl Error for PathPatternError
impl Error for PathPatternError
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 PathPatternError
impl ErrorCompat for PathPatternError
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 PathPatternError
impl PartialEq for PathPatternError
Source§fn eq(&self, other: &PathPatternError) -> bool
fn eq(&self, other: &PathPatternError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PathPatternError
impl StructuralPartialEq for PathPatternError
Auto Trait Implementations§
impl Freeze for PathPatternError
impl RefUnwindSafe for PathPatternError
impl Send for PathPatternError
impl Sync for PathPatternError
impl Unpin for PathPatternError
impl UnsafeUnpin for PathPatternError
impl UnwindSafe for PathPatternError
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