pub enum QueryError {
InvalidQuery(Box<ErrorContext>),
Io(Box<ErrorContext>),
Decode(Box<ErrorContext>),
Unavailable(Box<ErrorContext>),
Shutdown,
}Expand description
Stable shared error contract for historical query and follow operations.
Variants§
InvalidQuery(Box<ErrorContext>)
The query contract was invalid before execution.
Io(Box<ErrorContext>)
I/O failed while reading log data.
Decode(Box<ErrorContext>)
A JSONL record failed to decode.
Query or follow is unavailable in the current runtime state.
Shutdown
The query runtime was shut down.
Implementations§
Source§impl QueryError
impl QueryError
Sourcepub fn code(&self) -> ErrorCode
pub fn code(&self) -> ErrorCode
Returns the stable machine-readable error code for this variant.
Sourcepub fn diagnostic(&self) -> &Diagnostic
pub fn diagnostic(&self) -> &Diagnostic
Returns the attached diagnostic for the error.
Sourcepub fn invalid_query(message: impl Into<String>) -> Self
pub fn invalid_query(message: impl Into<String>) -> Self
Builds an invalid-query error using the stable shared code.
Trait Implementations§
Source§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 DiagnosticInfo for QueryError
impl DiagnosticInfo for QueryError
Source§fn diagnostic(&self) -> &Diagnostic
fn diagnostic(&self) -> &Diagnostic
Returns the structured diagnostic attached to this error surface.
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 PartialEq for QueryError
impl PartialEq for QueryError
Source§impl Serialize for QueryError
impl Serialize for QueryError
impl StructuralPartialEq for QueryError
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