Enum AxionError

Source
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 时,如果不同列的长度不匹配会触发此错误

Fields

§expected: usize

期望的长度

§found: usize

实际发现的长度

§name: String

相关的列名或操作名

§

DuplicateColumnName(String)

重复列名错误

当尝试创建包含重复列名的 DataFrame 时触发

§

ColumnNotFound(String)

列不存在错误

当按名称或索引选择列时,指定的列不存在

§

TypeError

类型错误

当尝试对列执行操作但类型不匹配时触发

Fields

§expected: String

期望的类型描述

§found: DataType

实际发现的类型

§name: String

相关的列名

§

TypeMismatch

类型不匹配错误

当尝试向下转型列时,类型不匹配

Fields

§expected: DataType

期望的数据类型

§found: DataType

实际发现的数据类型

§name: String

相关的列名

§

NoColumnsProvided

未提供列错误

当尝试创建 DataFrame 时没有提供任何列

§

CastError(CastError)

类型转换错误

§

JoinKeyTypeError

Join 操作键列类型错误

Fields

§side: String

哪一侧的表(“left” 或 “right”)

§name: String

键列名称

§expected: DataType

期望的数据类型

§found: DataType

实际发现的数据类型

§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AxionError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for AxionError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<Error> for AxionError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for AxionError

Source§

fn from(err: Error) -> Self

Converts to this type from the input type.
Source§

impl From<FromUtf8Error> for AxionError

Source§

fn from(err: FromUtf8Error) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.