pub enum QueryError {
Suspend,
Cycle {
path: Vec<String>,
},
Cancelled,
MissingDependency {
description: String,
},
DependenciesRemoved {
missing_keys: Vec<FullCacheKey>,
},
UserError(Arc<Error>),
}Expand description
Query errors including both system-level and user errors.
User errors can be propagated using the ? operator, which automatically
converts any Into<anyhow::Error> type into QueryError::UserError.
Variants§
Suspend
Query is waiting for async loading to complete.
This is returned when a dependency is still loading via a background task.
Use runtime.query_async() to wait for loading to complete, or handle
explicitly in your query logic.
Cycle
Dependency cycle detected.
The query graph contains a cycle, which would cause infinite recursion.
The path contains a debug representation of the cycle.
Cancelled
Query execution was cancelled.
MissingDependency
A required dependency is missing.
DependenciesRemoved
Dependencies were removed during query execution.
This can happen if another thread removes queries or assets while this query is being registered.
Fields
missing_keys: Vec<FullCacheKey>Keys that were not found during registration.
UserError(Arc<Error>)
User-defined error.
This variant allows user errors to be propagated through the query system
using the ? operator. Any type implementing Into<anyhow::Error> can be
converted to this variant.
Unlike system errors (Suspend, Cycle, etc.), UserError results are cached and participate in early cutoff optimization.
Trait Implementations§
Source§impl Clone for QueryError
impl Clone for QueryError
Source§fn clone(&self) -> QueryError
fn clone(&self) -> QueryError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more