pub struct MethodMetrics {
pub name: Arc<str>,
pub lines: Lines,
pub complexity: Complexity,
pub parameters: ParamCount,
pub called_methods: Arc<[Arc<str>]>,
pub accessed_fields: Arc<[Arc<str>]>,
pub return_type: Arc<str>,
pub is_public: bool,
pub is_static: bool,
pub is_async: bool,
pub tokens: Arc<[Arc<str>]>,
}Expand description
Method-level metrics with zero-copy strings where possible
Fields§
§name: Arc<str>§lines: Lines§complexity: Complexity§parameters: ParamCount§called_methods: Arc<[Arc<str>]>§accessed_fields: Arc<[Arc<str>]>§return_type: Arc<str>§is_public: bool§is_static: bool§is_async: bool§tokens: Arc<[Arc<str>]>Implementations§
Source§impl MethodMetrics
impl MethodMetrics
Sourcepub fn is_god_method(&self, thresholds: &Thresholds) -> bool
pub fn is_god_method(&self, thresholds: &Thresholds) -> bool
Check if method exceeds any threshold
Sourcepub fn violation_score(&self, thresholds: &Thresholds) -> f64
pub fn violation_score(&self, thresholds: &Thresholds) -> f64
Calculate violation score (higher = worse)
Trait Implementations§
Source§impl Clone for MethodMetrics
impl Clone for MethodMetrics
Source§fn clone(&self) -> MethodMetrics
fn clone(&self) -> MethodMetrics
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 MethodMetrics
impl Debug for MethodMetrics
Source§impl<'de> Deserialize<'de> for MethodMetrics
impl<'de> Deserialize<'de> for MethodMetrics
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 MethodMetrics
impl RefUnwindSafe for MethodMetrics
impl Send for MethodMetrics
impl Sync for MethodMetrics
impl Unpin for MethodMetrics
impl UnwindSafe for MethodMetrics
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