pub struct ConfigBuilder { /* private fields */ }Expand description
Builder for creating configurations programmatically
Implementations§
Source§impl ConfigBuilder
impl ConfigBuilder
Sourcepub fn output_format(self, format: OutputFormat) -> Self
pub fn output_format(self, format: OutputFormat) -> Self
Sourcepub fn max_prod_units(self, limit: usize) -> Self
pub fn max_prod_units(self, limit: usize) -> Self
Sourcepub fn max_weighted_score(self, limit: usize) -> Self
pub fn max_weighted_score(self, limit: usize) -> Self
Sourcepub fn fail_on_exceed(self, fail: bool) -> Self
pub fn fail_on_exceed(self, fail: bool) -> Self
Sourcepub fn max_prod_lines(self, limit: usize) -> Self
pub fn max_prod_lines(self, limit: usize) -> Self
Sourcepub fn per_type_limits(self, limits: PerTypeLimits) -> Self
pub fn per_type_limits(self, limits: PerTypeLimits) -> Self
Sets per-type limits
§Arguments
limits- Per-type limit configuration
§Returns
Self for method chaining
§Examples
use rust_diff_analyzer::config::{ConfigBuilder, PerTypeLimits};
let per_type = PerTypeLimits {
functions: Some(5),
structs: Some(3),
..Default::default()
};
let config = ConfigBuilder::new().per_type_limits(per_type).build();Sourcepub fn add_test_feature(self, feature: &str) -> Self
pub fn add_test_feature(self, feature: &str) -> Self
Sourcepub fn add_ignore_path(self, path: &str) -> Self
pub fn add_ignore_path(self, path: &str) -> Self
Trait Implementations§
Source§impl Debug for ConfigBuilder
impl Debug for ConfigBuilder
Source§impl Default for ConfigBuilder
impl Default for ConfigBuilder
Source§fn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConfigBuilder
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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