pub struct FindingPolicy { /* private fields */ }Expand description
The thresholds findings apply.
Separate from the profiler’s configuration on purpose: findings interpret a finished report, including one read back from disk that no profiler configuration accompanies.
Implementations§
Source§impl FindingPolicy
impl FindingPolicy
Sourcepub fn new() -> FindingPolicy
pub fn new() -> FindingPolicy
The default thresholds.
Sourcepub fn null_heavy_percentage(self, percentage: f64) -> FindingPolicy
pub fn null_heavy_percentage(self, percentage: f64) -> FindingPolicy
Report a column as null_heavy when its null percentage, at the
report’s 2dp precision, is at least percentage. The threshold is
applied at 2dp too, so the evidence states exactly what was compared.
Sourcepub fn mixed_types_percentage(self, percentage: f64) -> FindingPolicy
pub fn mixed_types_percentage(self, percentage: f64) -> FindingPolicy
Report a column as mixed_types when the values outside its dominant
lexical type make up at least percentage of those classified, both
at 2dp.
Sourcepub fn validate(&self) -> Result<(), FindingPolicyError>
pub fn validate(&self) -> Result<(), FindingPolicyError>
Check that every threshold can be applied, without needing a report.
Sourcepub fn evaluate(
&self,
report: &ProfileReport,
) -> Result<FindingsResult, FindingPolicyError>
pub fn evaluate( &self, report: &ProfileReport, ) -> Result<FindingsResult, FindingPolicyError>
Derive the findings a report supports.
The report is not modified and nothing is printed.
Trait Implementations§
Source§impl Clone for FindingPolicy
impl Clone for FindingPolicy
Source§fn clone(&self) -> FindingPolicy
fn clone(&self) -> FindingPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FindingPolicy
impl Debug for FindingPolicy
Source§impl Default for FindingPolicy
impl Default for FindingPolicy
Source§fn default() -> FindingPolicy
fn default() -> FindingPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for FindingPolicy
impl PartialEq for FindingPolicy
impl StructuralPartialEq for FindingPolicy
Auto Trait Implementations§
impl Freeze for FindingPolicy
impl RefUnwindSafe for FindingPolicy
impl Send for FindingPolicy
impl Sync for FindingPolicy
impl Unpin for FindingPolicy
impl UnsafeUnpin for FindingPolicy
impl UnwindSafe for FindingPolicy
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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