pub enum ValidationRule {
LogicalConsistency,
PriceRange(Range<f64>),
VolumeThreshold(u64),
NoMissingValues,
NoDuplicateTimestamps,
ChronologicalOrder,
OutlierDetection(OutlierMethod),
TimeSeriesGaps(Duration),
Custom(Box<ValidationFn>),
}Expand description
Validation rules for OHLCV data Note: Custom cannot be Debug, so we implement Debug manually.
Variants§
LogicalConsistency
Check logical consistency (high >= low, etc.)
PriceRange(Range<f64>)
Check price range
VolumeThreshold(u64)
Check volume threshold
NoMissingValues
Check for missing values
NoDuplicateTimestamps
Check for duplicate timestamps
ChronologicalOrder
Check chronological order
OutlierDetection(OutlierMethod)
Check for outliers using statistical methods
TimeSeriesGaps(Duration)
Check for gaps in time series
Custom(Box<ValidationFn>)
Custom validation function (not Debug)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ValidationRule
impl !UnwindSafe for ValidationRule
impl Freeze for ValidationRule
impl Send for ValidationRule
impl Sync for ValidationRule
impl Unpin for ValidationRule
impl UnsafeUnpin for ValidationRule
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