pub struct VortexError(/* private fields */);Expand description
The top-level error type for Vortex.
An error is a message, an optional underlying error, and a backtrace captured at construction. Cloning is cheap: the payload is shared, never copied.
The payload sits behind one pointer, so a VortexResult<T> costs the same as T plus at
most a word on the success path. Most results fit in two registers and are returned in them,
rather than through a stack slot the caller must reserve and read back. Constructing an error
is no more expensive for it: the payload’s allocation is the one the backtrace needed anyway.
Implementations§
Source§impl VortexError
impl VortexError
Sourcepub fn external<E>(source: E) -> Self
pub fn external<E>(source: E) -> Self
Wraps an underlying error as a Vortex error.
The wrapped error is preserved as the Error::source, so callers that care about the
concrete type can recover it with Error::source and downcast_ref.
Sourcepub fn with_context<T: Into<ErrString>>(self, msg: T) -> Self
pub fn with_context<T: Into<ErrString>>(self, msg: T) -> Self
Adds additional context to an error, preserving its source and backtrace.
Trait Implementations§
Source§impl Clone for VortexError
impl Clone for VortexError
Source§impl Debug for VortexError
impl Debug for VortexError
Source§impl Display for VortexError
impl Display for VortexError
Source§impl Error for VortexError
impl Error for VortexError
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()
Source§impl From<!> for VortexError
impl From<!> for VortexError
Source§fn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Source§impl From<&Arc<VortexError>> for VortexError
impl From<&Arc<VortexError>> for VortexError
Source§fn from(value: &Arc<VortexError>) -> Self
fn from(value: &Arc<VortexError>) -> Self
Source§impl From<Arc<VortexError>> for VortexError
impl From<Arc<VortexError>> for VortexError
Source§fn from(value: Arc<VortexError>) -> Self
fn from(value: Arc<VortexError>) -> Self
Source§impl From<ArrowError> for VortexError
impl From<ArrowError> for VortexError
Source§fn from(value: ArrowError) -> Self
fn from(value: ArrowError) -> Self
Source§impl From<DecodeError> for VortexError
impl From<DecodeError> for VortexError
Source§fn from(value: DecodeError) -> Self
fn from(value: DecodeError) -> Self
Source§impl From<EncodeError> for VortexError
impl From<EncodeError> for VortexError
Source§fn from(value: EncodeError) -> Self
fn from(value: EncodeError) -> Self
Source§impl From<Error> for VortexError
impl From<Error> for VortexError
Source§impl From<Error> for VortexError
Available on crate feature object_store only.
impl From<Error> for VortexError
object_store only.Source§impl From<Error> for VortexError
impl From<Error> for VortexError
Source§impl From<InvalidFlatbuffer> for VortexError
Available on crate feature flatbuffers only.
impl From<InvalidFlatbuffer> for VortexError
flatbuffers only.Source§fn from(value: InvalidFlatbuffer) -> Self
fn from(value: InvalidFlatbuffer) -> Self
Source§impl From<JoinError> for VortexError
Available on crate feature tokio only.
impl From<JoinError> for VortexError
tokio only.