pub enum DatarustError {
NotFitted(String),
InvalidInput(String),
ShapeMismatch {
expected: String,
actual: String,
},
EmptyInput(String),
AllMissing(String),
UnknownCategory(String),
UnknownLabel(String),
InvalidConfig(String),
Singular(String),
Io(Error),
Serde(Error),
}Expand description
Errors returned by datarust operations.
Every fallible public API returns Result<T, DatarustError>. The variant
describes which class of problem occurred.
Variants§
NotFitted(String)
A transformer was used before being fitted.
InvalidInput(String)
The supplied data is malformed or otherwise invalid for the operation.
ShapeMismatch
Two operands did not have compatible dimensions.
Fields
EmptyInput(String)
An empty collection was provided where at least one element is required.
AllMissing(String)
A column (or set of columns) consisted entirely of missing values.
UnknownCategory(String)
A category unseen at fit time was encountered at transform time.
UnknownLabel(String)
A label unseen at fit time was encountered at transform time.
InvalidConfig(String)
A transformer was constructed with an illegal parameter combination.
Singular(String)
A numerical operation broke down (e.g. division by zero, singular matrix).
Io(Error)
An IO failure while reading from or writing to disk.
Serde(Error)
A (de)serialization failure (e.g. malformed JSON).
Trait Implementations§
Source§impl Debug for DatarustError
impl Debug for DatarustError
Source§impl Display for DatarustError
impl Display for DatarustError
Source§impl Error for DatarustError
impl Error for DatarustError
Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for DatarustError
impl From<Error> for DatarustError
Auto Trait Implementations§
impl !RefUnwindSafe for DatarustError
impl !UnwindSafe for DatarustError
impl Freeze for DatarustError
impl Send for DatarustError
impl Sync for DatarustError
impl Unpin for DatarustError
impl UnsafeUnpin for DatarustError
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
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>
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>
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