pub enum ErrorStage {
Compile,
Runtime,
Internal,
}Expand description
Which stage of statement handling an error belongs to (ADR-0319): a compile-class error fails the statement before any work is done (Bolt’s RUN), a runtime-class error is discovered while producing rows (Bolt’s first PULL/DISCARD), and an internal-class error is not the statement’s fault and is genericized at every trust boundary (ADR-0260).
Variants§
Compile
The statement itself is rejected: the RUN fails under the code.
Runtime
Discovered while executing: reported at the first row pull.
Internal
Engine-internal: genericized for the client (ADR-0260).
Implementations§
Source§impl ErrorStage
impl ErrorStage
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The one string spelling of the stage (ADR-0502 §2: the error shape’s
stage field) — "compile", "runtime" or "internal". The C ABI
and the Python binding both render it from here, so the spelling is
single-sourced.
use relate_error::ErrorStage;
assert_eq!(ErrorStage::Compile.as_str(), "compile");
assert_eq!(ErrorStage::Runtime.as_str(), "runtime");
assert_eq!(ErrorStage::Internal.as_str(), "internal");Trait Implementations§
Source§impl Clone for ErrorStage
impl Clone for ErrorStage
impl Copy for ErrorStage
Source§impl Debug for ErrorStage
impl Debug for ErrorStage
impl Eq for ErrorStage
Source§impl PartialEq for ErrorStage
impl PartialEq for ErrorStage
impl StructuralPartialEq for ErrorStage
Auto Trait Implementations§
impl Forget for ErrorStage
impl Freeze for ErrorStage
impl Move for ErrorStage
impl RefUnwindSafe for ErrorStage
impl Send for ErrorStage
impl Sync for ErrorStage
impl Unpin for ErrorStage
impl UnsafeUnpin for ErrorStage
impl UnwindSafe for ErrorStage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.