pub enum AxionError {
Show 17 variants
MismatchedLengths {
expected: usize,
found: usize,
name: String,
},
DuplicateColumnName(String),
ColumnNotFound(String),
TypeError {
expected: String,
found: DataType,
name: String,
},
TypeMismatch {
expected: DataType,
found: DataType,
name: String,
},
NoColumnsProvided,
CastError(CastError),
JoinKeyTypeError {
side: String,
name: String,
expected: DataType,
found: DataType,
},
IndexOutOfBounds(usize, usize),
IndexOutOfRange(usize, usize),
ComputeError(String),
UnsupportedOperation(String),
InvalidArgument(String),
InternalError(String),
CsvError(String),
IoError(String),
Other(String),
}Expand description
Axion 操作中可能发生的错误类型
涵盖了数据处理、类型转换、IO 操作等各种场景下可能出现的错误情况。 提供了详细的错误信息以便于调试和错误处理。
Variants§
MismatchedLengths
DataFrame 列长度不一致错误
当尝试创建 DataFrame 时,如果不同列的长度不匹配会触发此错误
DuplicateColumnName(String)
重复列名错误
当尝试创建包含重复列名的 DataFrame 时触发
ColumnNotFound(String)
列不存在错误
当按名称或索引选择列时,指定的列不存在
TypeError
类型错误
当尝试对列执行操作但类型不匹配时触发
TypeMismatch
类型不匹配错误
当尝试向下转型列时,类型不匹配
NoColumnsProvided
未提供列错误
当尝试创建 DataFrame 时没有提供任何列
CastError(CastError)
类型转换错误
JoinKeyTypeError
Join 操作键列类型错误
Fields
IndexOutOfBounds(usize, usize)
索引越界错误
当访问的索引超出有效范围时触发
IndexOutOfRange(usize, usize)
索引超出范围错误(别名,用于向后兼容)
ComputeError(String)
计算错误
在数学计算过程中发生的错误(如除零)
UnsupportedOperation(String)
不支持的操作错误
当在不支持的类型上执行特定操作时触发
InvalidArgument(String)
无效参数错误
当提供的参数不符合要求时触发
InternalError(String)
内部错误
表示意外的内部状态或逻辑错误,通常表示代码中存在 bug
CsvError(String)
CSV 处理错误
在读取或写入 CSV 文件时发生的错误
IoError(String)
IO 错误
文件输入输出相关的错误
Other(String)
其他未分类错误
Trait Implementations§
Source§impl Debug for AxionError
impl Debug for AxionError
Source§impl Display for AxionError
impl Display for AxionError
Source§impl Error for AxionError
impl Error for AxionError
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<Error> for AxionError
impl From<Error> for AxionError
Source§impl From<Error> for AxionError
impl From<Error> for AxionError
Source§impl From<FromUtf8Error> for AxionError
impl From<FromUtf8Error> for AxionError
Source§fn from(err: FromUtf8Error) -> Self
fn from(err: FromUtf8Error) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AxionError
impl RefUnwindSafe for AxionError
impl Send for AxionError
impl Sync for AxionError
impl Unpin for AxionError
impl UnwindSafe for AxionError
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more