pub enum RequestError {
Show 15 variants
InvalidValue {
axis: &'static str,
value: String,
expected: String,
},
AnalyzerNamedAsView {
value: String,
analyzer: &'static str,
suggested_view: &'static str,
},
ViewNeedsContent(ViewSpec),
NeedsAnalyzer {
item: &'static str,
analyzer: &'static str,
},
IgnoredWithoutObservation(IgnoredEntries),
PopulationMismatch {
held: IgnoredEntries,
requested: IgnoredEntries,
},
ScopeUnsupported {
axis: ScopeAxis,
reason: &'static str,
},
ContentMismatch {
held: AnalysisSet,
requested: AnalysisSet,
},
WatchScope,
WatchContent,
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.
Variants§
InvalidValue
A value did not match its axis’s grammar.
Fields
AnalyzerNamedAsView
An analyzer name was supplied where a report view was expected.
Fields
ViewNeedsContent(ViewSpec)
A view has no metadata-only projection, and the request enables no analyzer.
NeedsAnalyzer
A view or ordering key requires an analyzer the request did not enable.
Fields
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.
WatchContent
A watch was asked to keep content analysis current.
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()