#[non_exhaustive]pub enum ParseSingleError {
Show 21 variants
    InvalidRegex {
        span: SourceSpan,
        message: String,
    },
    InvalidGlob {
        span: SourceSpan,
        error: GlobConstructError,
    },
    BannedPredicate {
        kind: FiltersetKind,
        span: SourceSpan,
        reason: BannedPredicateReason,
    },
    InvalidRegexWithoutMessage(SourceSpan),
    ExpectedCloseRegex(SourceSpan),
    InvalidOrOperator(SourceSpan),
    InvalidAndOperator(SourceSpan),
    UnexpectedArgument(SourceSpan),
    UnexpectedComma(SourceSpan),
    InvalidString(SourceSpan),
    ExpectedOpenParenthesis(SourceSpan),
    ExpectedCloseParenthesis(SourceSpan),
    InvalidEscapeCharacter(SourceSpan),
    ExpectedExpr(SourceSpan),
    ExpectedEndOfExpression(SourceSpan),
    NoPackageMatch(SourceSpan),
    NoBinaryIdMatch(SourceSpan),
    NoBinaryNameMatch(SourceSpan),
    InvalidPlatformArgument(SourceSpan),
    UnsupportedExpression(SourceSpan),
    Unknown,
}Expand description
An individual error that occurred while parsing a filterset.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidRegex
An invalid regex was encountered.
Fields
span: SourceSpanThe part of the input that failed.
InvalidGlob
An invalid glob pattern was encountered.
Fields
span: SourceSpanThe part of the input that failed.
error: GlobConstructErrorThe underlying error.
BannedPredicate
A banned predicate was encountered.
Fields
kind: FiltersetKindThe kind of expression.
span: SourceSpanThe span of the banned predicate.
reason: BannedPredicateReasonThe reason why the predicate is banned.
InvalidRegexWithoutMessage(SourceSpan)
An invalid regex was encountered but we couldn’t determine a better error message.
ExpectedCloseRegex(SourceSpan)
A regex string was not closed.
InvalidOrOperator(SourceSpan)
An unexpected OR operator was found.
InvalidAndOperator(SourceSpan)
An unexpected AND operator was found.
UnexpectedArgument(SourceSpan)
An unexpected argument was found.
UnexpectedComma(SourceSpan)
An unexpected comma was found.
InvalidString(SourceSpan)
An invalid string was found.
ExpectedOpenParenthesis(SourceSpan)
An open parenthesis ( was expected but not found.
ExpectedCloseParenthesis(SourceSpan)
A close parenthesis ) was expected but not found.
InvalidEscapeCharacter(SourceSpan)
An invalid escape character was found.
ExpectedExpr(SourceSpan)
An expression was expected in this position but not found.
ExpectedEndOfExpression(SourceSpan)
The expression was expected to end here but some extra text was found.
NoPackageMatch(SourceSpan)
This matcher didn’t match any packages.
NoBinaryIdMatch(SourceSpan)
This matcher didn’t match any binary IDs.
NoBinaryNameMatch(SourceSpan)
This matcher didn’t match any binary names.
InvalidPlatformArgument(SourceSpan)
Expected “host” or “target” for a platform() predicate.
UnsupportedExpression(SourceSpan)
Contained an unsupported expression.
Unknown
An unknown parsing error occurred.
Trait Implementations§
Source§impl Clone for ParseSingleError
 
impl Clone for ParseSingleError
Source§fn clone(&self) -> ParseSingleError
 
fn clone(&self) -> ParseSingleError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParseSingleError
 
impl Debug for ParseSingleError
Source§impl Diagnostic for ParseSingleError
 
impl Diagnostic for ParseSingleError
Source§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
 
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s [Diagnostic::source_code]§fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
 
fn code<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.§fn severity(&self) -> Option<Severity>
 
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read more§fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
 
fn help<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?§fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
 
fn url<'a>(&'a self) -> Option<Box<dyn Display + 'a>>
Diagnostic.§fn source_code(&self) -> Option<&dyn SourceCode>
 
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s [Diagnostic::labels] to.Diagnostics.§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
 
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Display for ParseSingleError
 
impl Display for ParseSingleError
Source§impl Error for ParseSingleError
 
impl Error for ParseSingleError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
 
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
 
fn description(&self) -> &str
Source§impl PartialEq for ParseSingleError
 
impl PartialEq for ParseSingleError
impl Eq for ParseSingleError
impl StructuralPartialEq for ParseSingleError
Auto Trait Implementations§
impl Freeze for ParseSingleError
impl RefUnwindSafe for ParseSingleError
impl Send for ParseSingleError
impl Sync for ParseSingleError
impl Unpin for ParseSingleError
impl UnwindSafe for ParseSingleError
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
 
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<D> OwoColorize for D
 
impl<D> OwoColorize for D
§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
    C: Color,
 
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
    C: Color,
§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
    C: Color,
 
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
    C: Color,
§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
 
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
 
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
 
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
 
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
 
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
 
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
 
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
 
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
 
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
 
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
 
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
 
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
 
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
 
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
 
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
 
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
 
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
 
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
 
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
 
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
 
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
 
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
 
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
 
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
OwoColorize::fg] or
a color-specific method, such as [OwoColorize::green], Read more§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
 
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
    Color: DynColor,
OwoColorize::bg] or
a color-specific method, such as [OwoColorize::on_yellow], Read more