pub enum QueryError {
AuthorizationFailed {
reason: String,
},
MissingCapability {
capability: String,
},
ExecutionError {
reason: String,
},
ParseError(QueryParseError),
SubscriptionNotFound {
query_id: String,
},
JournalError {
reason: String,
},
HandlerUnavailable,
Internal {
reason: String,
},
ConsensusTimeout {
consensus_id: ConsensusId,
},
SnapshotNotAvailable {
prestate_hash: Hash32,
},
IsolationNotSupported {
reason: String,
},
}Expand description
Error type for query operations
Variants§
AuthorizationFailed
Authorization failed
MissingCapability
Missing required capability
ExecutionError
Datalog execution error
ParseError(QueryParseError)
Result parsing error
SubscriptionNotFound
Query not found (for subscriptions)
JournalError
Journal access error
Handler not available
Internal
Internal error
ConsensusTimeout
Consensus wait timeout
Fields
§
consensus_id: ConsensusIdSnapshotNotAvailable
Snapshot not available (garbage collected)
IsolationNotSupported
Isolation level not supported
Implementations§
Source§impl QueryError
impl QueryError
Create an authorization failed error
Sourcepub fn missing_capability(cap: &QueryCapability) -> Self
pub fn missing_capability(cap: &QueryCapability) -> Self
Create a missing capability error
Sourcepub fn execution_error(reason: impl Into<String>) -> Self
pub fn execution_error(reason: impl Into<String>) -> Self
Create an execution error
Sourcepub fn journal_error(reason: impl Into<String>) -> Self
pub fn journal_error(reason: impl Into<String>) -> Self
Create a journal error
Sourcepub fn consensus_timeout(consensus_id: ConsensusId) -> Self
pub fn consensus_timeout(consensus_id: ConsensusId) -> Self
Create a consensus timeout error
Sourcepub fn snapshot_not_available(prestate_hash: Hash32) -> Self
pub fn snapshot_not_available(prestate_hash: Hash32) -> Self
Create a snapshot not available error
Sourcepub fn isolation_not_supported(reason: impl Into<String>) -> Self
pub fn isolation_not_supported(reason: impl Into<String>) -> Self
Create an isolation not supported error
Trait Implementations§
Source§impl Clone for QueryError
impl Clone for QueryError
Source§fn clone(&self) -> QueryError
fn clone(&self) -> QueryError
Returns a duplicate of the value. Read more
1.0.0 · 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 QueryError
impl Debug for QueryError
Source§impl<'de> Deserialize<'de> for QueryError
impl<'de> Deserialize<'de> for QueryError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for QueryError
impl Display for QueryError
Source§impl Error for QueryError
impl Error for QueryError
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 From<QueryError> for AuraError
impl From<QueryError> for AuraError
Source§fn from(err: QueryError) -> Self
fn from(err: QueryError) -> Self
Converts to this type from the input type.
Source§impl From<QueryParseError> for QueryError
impl From<QueryParseError> for QueryError
Source§fn from(source: QueryParseError) -> Self
fn from(source: QueryParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for QueryError
impl RefUnwindSafe for QueryError
impl Send for QueryError
impl Sync for QueryError
impl Unpin for QueryError
impl UnsafeUnpin for QueryError
impl UnwindSafe for QueryError
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
Mutably borrows from an owned value. Read more