#[non_exhaustive]pub enum RequestError {
Show 15 variants
InvalidValue {
axis: &'static str,
value: String,
expected: String,
},
#[non_exhaustive] AnalyzerNamedAsView {
value: String,
analyzer: &'static str,
suggested_view: ViewSpec,
},
#[non_exhaustive] ViewNeedsAnalyzer {
view: ViewSpec,
held: AnalysisSet,
holder: BasisHolder,
},
#[non_exhaustive] SortNeedsAnalyzer {
metric: &'static str,
analyzer: AnalysisSet,
held: AnalysisSet,
holder: BasisHolder,
},
IgnoredWithoutObservation(IgnoredEntries),
PopulationMismatch {
held: IgnoredEntries,
requested: IgnoredEntries,
},
ScopeUnsupported {
axis: ScopeAxis,
reason: &'static str,
},
ContentMismatch {
held: AnalysisSet,
requested: AnalysisSet,
},
WatchScope,
#[non_exhaustive] WatchContent {
named: AnalysisSet,
views: Vec<ViewSpec>,
},
WatchCacheOnly,
StaleOkCacheOff,
RootMismatch {
held: PathBuf,
requested: PathBuf,
},
DeliveryUnsupported {
route: &'static str,
reason: &'static str,
},
ViewLimit {
attempted: usize,
limit: usize,
},
}Expand description
Why a request cannot be answered as asked.
Typed so a caller can match the refusal it can act on, and rendered by
Self::message in the vocabulary of the surface the request came through.
Non-exhaustive, so a later refusal is an additive change: a match outside this crate
names the refusals it acts on and renders the rest with Self::message.
Self::AnalyzerNamedAsView, Self::ViewNeedsAnalyzer, Self::SortNeedsAnalyzer,
and Self::WatchContent are non-exhaustive too, so a field one of them gains later
is additive as well: a match outside this crate reads them with ...
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidValue
A value did not match its axis’s grammar.
Fields
#[non_exhaustive]AnalyzerNamedAsView
An analyzer name was supplied where a report view was expected.
Fields
This variant is marked as non-exhaustive
#[non_exhaustive]ViewNeedsAnalyzer
A view shows analysis the basis does not hold.
Only a basis the request did not build can raise this – a retained index, an opened
root, or one supplied whole – because Request::build enables what its views
imply, and a read never widens what a holder was opened with.
Fields
This variant is marked as non-exhaustive
held: AnalysisSetThe analyzers the basis holds.
holder: BasisHolderWhat fixed those analyzers, which decides the remedy the refusal names.
#[non_exhaustive]SortNeedsAnalyzer
A sort by a content metric whose analyzer the request did not enable.
Unlike a content view, a sort implies nothing: it orders rows and never says what a report is about, so the analyzer must be named.
Fields
This variant is marked as non-exhaustive
analyzer: AnalysisSetThe analyzers that measure it.
held: AnalysisSetThe analyzers the basis holds.
holder: BasisHolderWhat fixed those analyzers, which decides the remedy the refusal names.
IgnoredWithoutObservation(IgnoredEntries)
A selection by ignored state over a scan that observes no .gitignore.
PopulationMismatch
A retained narrow population cannot answer a read of another population.
Fields
held: IgnoredEntriesPopulation retained by the holder.
requested: IgnoredEntriesPopulation this read selected.
ScopeUnsupported
A scan scope this build cannot honour, whatever the delivery.
Fields
ContentMismatch
A read asks for another analyzer set than the retained index holds.
Fields
held: AnalysisSetThe analyzers the index was built with.
requested: AnalysisSetThe analyzers the read asks for.
WatchScope
A watch was asked to narrow its scan scope.
#[non_exhaustive]WatchContent
A watch was asked to keep content analysis current.
Names every axis that enabled analysis, so a caller who drops one is not refused again for the other.
Fields
This variant is marked as non-exhaustive
named: AnalysisSetThe analyzers the caller named, or that a basis supplied whole holds; none
when every analyzer was implied by a view.
WatchCacheOnly
A watch was asked to start from a snapshot nothing verifies.
StaleOkCacheOff
A stale answer was asked of a delivery that never reads the snapshot.
RootMismatch
An operation names another root than the retained index it would mutate.
DeliveryUnsupported
A route cannot honor the requested execution policy.
Fields
ViewLimit
A read names more views than one report may carry.
Implementations§
Source§impl RequestError
impl RequestError
Sourcepub fn message(&self, axes: &AxisNames) -> String
pub fn message(&self, axes: &AxisNames) -> String
The refusal in the vocabulary of the surface axes describes.
Self::InvalidValue already carries its axis, named by the surface that parsed
it, so axes names only the knobs the other refusals point at.
Trait Implementations§
Source§impl Clone for RequestError
impl Clone for RequestError
Source§impl Debug for RequestError
impl Debug for RequestError
Source§impl Display for RequestError
The library’s vocabulary, as AxisNames::default is: a refusal rendered without
naming a surface belongs to a library caller, not to the command line.
impl Display for RequestError
The library’s vocabulary, as AxisNames::default is: a refusal rendered without
naming a surface belongs to a library caller, not to the command line.
impl Eq for RequestError
Source§impl Error for RequestError
impl Error for RequestError
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
use the Display impl or to_string()