pub struct PatternConfig {
pub min_confidence: f64,
pub patterns: Vec<String>,
pub language: Option<String>,
pub max_file_size: u64,
pub include_tests: bool,
pub include_generated: bool,
pub detect_modern_patterns: bool,
pub language_specific: bool,
}Expand description
Configuration for pattern detection.
Fields§
§min_confidence: f64Minimum confidence threshold for reporting patterns. Default: 0.5 (medium confidence).
patterns: Vec<String>Patterns to detect (empty = all patterns).
language: Option<String>Language filter (None = auto-detect).
max_file_size: u64Maximum file size to process (bytes).
include_tests: boolInclude test files in detection.
include_generated: boolInclude generated code in detection.
detect_modern_patterns: boolDetect modern patterns (DI, Repository).
language_specific: boolLanguage-specific pattern detection.
Implementations§
Source§impl PatternConfig
impl PatternConfig
Sourcepub fn for_pattern(pattern: impl Into<String>) -> Self
pub fn for_pattern(pattern: impl Into<String>) -> Self
Create a configuration for a specific pattern.
Sourcepub fn with_min_confidence(self, confidence: f64) -> Self
pub fn with_min_confidence(self, confidence: f64) -> Self
Set minimum confidence threshold.
Sourcepub fn with_language(self, lang: impl Into<String>) -> Self
pub fn with_language(self, lang: impl Into<String>) -> Self
Set language filter.
Sourcepub fn with_modern_patterns(self, enable: bool) -> Self
pub fn with_modern_patterns(self, enable: bool) -> Self
Enable/disable modern pattern detection.
Trait Implementations§
Source§impl Clone for PatternConfig
impl Clone for PatternConfig
Source§fn clone(&self) -> PatternConfig
fn clone(&self) -> PatternConfig
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 moreSource§impl Debug for PatternConfig
impl Debug for PatternConfig
Source§impl Default for PatternConfig
impl Default for PatternConfig
Source§impl<'de> Deserialize<'de> for PatternConfig
impl<'de> Deserialize<'de> for PatternConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PatternConfig
impl RefUnwindSafe for PatternConfig
impl Send for PatternConfig
impl Sync for PatternConfig
impl Unpin for PatternConfig
impl UnwindSafe for PatternConfig
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request