pub enum MicrostructuralError {
Show 14 variants
UnknownTickRule(i32),
NumLettersOutOfRange,
EmptyArray,
NanInArray,
NonPositiveStep,
InvalidCodebook(&'static str),
DictionaryTooLong,
WrongColumnCount,
PriceNotFloat,
VolumeNotNumeric,
TimestampNotDatetime,
ShortRow(usize),
Csv(String),
Input(InputError),
}Expand description
Errors returned by the encoding functions and by MicrostructuralFeaturesGenerator.
Variants§
UnknownTickRule(i32)
encode_tick_rule_array received a value other than 1, -1 or 0.
NumLettersOutOfRange
quantile_mapping was asked for zero letters or more than 256.
EmptyArray
quantile_mapping or sigma_mapping received an empty array.
NanInArray
quantile_mapping, sigma_mapping or encode_array received a NaN value.
NonPositiveStep
sigma_mapping received a step that is not a positive finite number (zero,
negative, NaN or infinite).
InvalidCodebook(&'static str)
encode_array or MicrostructuralFeaturesGenerator::new_from_csv received a
codebook that is empty or has a NaN value, so some value would have no letter.
DictionaryTooLong
sigma_mapping would need more than 256 letters.
WrongColumnCount
The first data row of the trades CSV does not have exactly three columns.
PriceNotFloat
The price in the first data row of the trades CSV is not a number.
VolumeNotNumeric
The volume in the first data row of the trades CSV is not a number.
TimestampNotDatetime
The timestamp in the first data row of the trades CSV is not in a supported format.
ShortRow(usize)
A trades CSV row has fewer than three columns; the payload is the column count.
Csv(String)
Reading or parsing the trades CSV failed; the payload is the underlying error.
Input(InputError)
A feature function rejected its inputs.
Trait Implementations§
Source§impl Clone for MicrostructuralError
impl Clone for MicrostructuralError
Source§fn clone(&self) -> MicrostructuralError
fn clone(&self) -> MicrostructuralError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MicrostructuralError
impl Debug for MicrostructuralError
Source§impl Display for MicrostructuralError
impl Display for MicrostructuralError
Source§impl Error for MicrostructuralError
impl Error for MicrostructuralError
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<InputError> for MicrostructuralError
impl From<InputError> for MicrostructuralError
Source§fn from(source: InputError) -> Self
fn from(source: InputError) -> Self
Source§impl PartialEq for MicrostructuralError
impl PartialEq for MicrostructuralError
Source§fn eq(&self, other: &MicrostructuralError) -> bool
fn eq(&self, other: &MicrostructuralError) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for MicrostructuralError
Auto Trait Implementations§
impl Freeze for MicrostructuralError
impl RefUnwindSafe for MicrostructuralError
impl Send for MicrostructuralError
impl Sync for MicrostructuralError
impl Unpin for MicrostructuralError
impl UnsafeUnpin for MicrostructuralError
impl UnwindSafe for MicrostructuralError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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§impl<T> Key for Twhere
T: Clone,
impl<T> Key for Twhere
T: Clone,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more