pub struct DataValidator { /* private fields */ }Expand description
Validates bar sequences for timestamp ordering and OHLC integrity.
§Example
use egui_charts::validation::DataValidator;
let validator = DataValidator::new();
// validate_sequence(&bars) returns Vec<ValidationResult>Implementations§
Source§impl DataValidator
impl DataValidator
Sourcepub fn with_direction(self, direction: MismatchDirection) -> Self
pub fn with_direction(self, direction: MismatchDirection) -> Self
Set the expected direction of ts
Sourcepub fn with_logging(self, log_warnings: bool) -> Self
pub fn with_logging(self, log_warnings: bool) -> Self
Enable or disable warning logging
Sourcepub fn with_ohlc_validation(self, validate: bool) -> Self
pub fn with_ohlc_validation(self, validate: bool) -> Self
Enable or disable OHLC validation
Sourcepub fn validate_sequence(&self, bars: &[Bar]) -> Vec<ValidationResult>
pub fn validate_sequence(&self, bars: &[Bar]) -> Vec<ValidationResult>
Validate a sequence of bars
Sourcepub fn validate_new_bar(
&self,
last_bar: Option<&Bar>,
new_bar: &Bar,
) -> ValidationResult
pub fn validate_new_bar( &self, last_bar: Option<&Bar>, new_bar: &Bar, ) -> ValidationResult
Validate a single new bar against the last bar in a sequence
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DataValidator
impl RefUnwindSafe for DataValidator
impl Send for DataValidator
impl Sync for DataValidator
impl Unpin for DataValidator
impl UnsafeUnpin for DataValidator
impl UnwindSafe for DataValidator
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