#[non_exhaustive]pub enum Error {
Io {
source: Error,
context: String,
},
Decode(String),
Layout(String),
Encode(String),
Conversion {
input: String,
desired_type: &'static str,
},
Utf8 {
source: Utf8Error,
context: String,
},
BadArgument {
param_name: String,
desc: String,
},
Arrow {
source: ArrowError,
context: String,
},
Parquet {
source: ParquetError,
context: String,
},
}Expand description
An error that can occur while processing DBN data.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io
An I/O error while reading or writing DBN or another encoding.
Decode(String)
An error while decoding from DBN.
Layout(String)
A stream layout failed validation at metadata load.
Encode(String)
An error with text encoding.
Conversion
An conversion error between types or encodings.
Fields
Utf8
An error with conversion of bytes to UTF-8.
Fields
BadArgument
An invalid argument was passed to a function.
Fields
Arrow
arrow only.An error from the arrow library while encoding columnar data.
Fields
source: ArrowErrorThe original error.
Parquet
parquet only.An error from the parquet library while encoding.
Fields
source: ParquetErrorThe original error.
Implementations§
Source§impl Error
impl Error
Sourcepub fn io(error: Error, context: impl ToString) -> Self
pub fn io(error: Error, context: impl ToString) -> Self
Creates a new I/O dbn::Error.
Sourcepub fn decode(msg: impl ToString) -> Self
pub fn decode(msg: impl ToString) -> Self
Creates a new decode dbn::Error.
Sourcepub fn layout(msg: impl ToString) -> Self
pub fn layout(msg: impl ToString) -> Self
Creates a new stream layout dbn::Error.
Sourcepub fn encode(msg: impl ToString) -> Self
pub fn encode(msg: impl ToString) -> Self
Creates a new encode dbn::Error.
Sourcepub fn conversion<T>(input: impl ToString) -> Self
pub fn conversion<T>(input: impl ToString) -> Self
Creates a new conversion dbn::Error where desired_type is T.
Sourcepub fn utf8(error: Utf8Error, context: impl ToString) -> Self
pub fn utf8(error: Utf8Error, context: impl ToString) -> Self
Creates a new UTF-8 dbn::Error.
Sourcepub fn arrow(error: ArrowError, context: impl ToString) -> Self
Available on crate feature arrow only.
pub fn arrow(error: ArrowError, context: impl ToString) -> Self
arrow only.Creates a new Arrow dbn::Error.
Sourcepub fn parquet(error: ParquetError, context: impl ToString) -> Self
Available on crate feature parquet only.
pub fn parquet(error: ParquetError, context: impl ToString) -> Self
parquet only.Creates a new Parquet dbn::Error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()