pub struct ReportConfig {
pub top_k: usize,
pub categories: Vec<Category>,
pub interesting_error_cap: f64,
}Expand description
Configuration for report generation
Fields§
§top_k: usizeNumber of matches per category
categories: Vec<Category>Which categories to include
interesting_error_cap: f64Error cap for “interesting” category
Implementations§
Source§impl ReportConfig
impl ReportConfig
Sourcepub fn with_stable(self) -> Self
pub fn with_stable(self) -> Self
Create config with all categories (including stable)
This method is part of the public API for library consumers who want to ensure the stability category is included in their reports.
Sourcepub fn without_stable(self) -> Self
pub fn without_stable(self) -> Self
Remove stability category
Sourcepub fn with_top_k(self, k: usize) -> Self
pub fn with_top_k(self, k: usize) -> Self
Set top-K
Sourcepub fn with_target(self, target: f64) -> Self
pub fn with_target(self, target: f64) -> Self
Set interesting error cap based on target
Trait Implementations§
Source§impl Clone for ReportConfig
impl Clone for ReportConfig
Source§fn clone(&self) -> ReportConfig
fn clone(&self) -> ReportConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ReportConfig
impl RefUnwindSafe for ReportConfig
impl Send for ReportConfig
impl Sync for ReportConfig
impl Unpin for ReportConfig
impl UnsafeUnpin for ReportConfig
impl UnwindSafe for ReportConfig
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