pub struct RuleSet { /* private fields */ }Expand description
The main RuleSet struct that holds the context and rules
Implementations§
Source§impl RuleSet
impl RuleSet
Sourcepub fn with_schema_rule(&mut self, rule: Arc<dyn SchemaRule>) -> &mut Self
pub fn with_schema_rule(&mut self, rule: Arc<dyn SchemaRule>) -> &mut Self
Add a schema rule
Sourcepub fn with_column_rule(
&mut self,
column_name: impl AsRef<str>,
rule: Arc<dyn ColumnRule>,
) -> &mut Self
pub fn with_column_rule( &mut self, column_name: impl AsRef<str>, rule: Arc<dyn ColumnRule>, ) -> &mut Self
Add a column rule
Sourcepub fn with_table_rule(
&mut self,
column_name: impl AsRef<str>,
table_rule: Arc<dyn TableRule>,
check: Option<Arc<dyn ColumnRule>>,
) -> &mut Self
pub fn with_table_rule( &mut self, column_name: impl AsRef<str>, table_rule: Arc<dyn TableRule>, check: Option<Arc<dyn ColumnRule>>, ) -> &mut Self
Add a table rule
pub async fn apply_table_rules( &self, df: DataFrame, ) -> Result<DataFrame, ValidationError>
Sourcepub async fn apply(&self, df: &DataFrame) -> Result<DataFrame, ValidationError>
pub async fn apply(&self, df: &DataFrame) -> Result<DataFrame, ValidationError>
Apply all rules to a DataFrame
pub async fn partition( &self, df: &DataFrame, ) -> Result<(DataFrame, DataFrame), ValidationError>
pub async fn derived_statistics( &self, df: &DataFrame, extra_columns: Option<Vec<&str>>, ) -> Result<DataFrame, ValidationError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleSet
impl !RefUnwindSafe for RuleSet
impl Send for RuleSet
impl Sync for RuleSet
impl Unpin for RuleSet
impl UnsafeUnpin for RuleSet
impl !UnwindSafe for RuleSet
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> 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>
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