#[non_exhaustive]pub enum MetricSubject {
File(FileMetricsInfo),
Type(TypeInfo),
Distance(DistanceInfo),
}Expand description
The extracted subject measured by a metric.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
File(FileMetricsInfo)
One source file.
Type(TypeInfo)
One Rust type declaration.
Distance(DistanceInfo)
One file-level component with its project coupling evidence.
Implementations§
Source§impl MetricSubject
impl MetricSubject
Sourcepub fn identifier(&self) -> &str
pub fn identifier(&self) -> &str
Returns the stable file path or module-qualified type name.
Sourcepub const fn as_file(&self) -> Option<&FileMetricsInfo>
pub const fn as_file(&self) -> Option<&FileMetricsInfo>
Returns the file subject, if this measurement is file-level.
Sourcepub const fn as_type(&self) -> Option<&TypeInfo>
pub const fn as_type(&self) -> Option<&TypeInfo>
Returns the type subject, if this measurement is type-level.
Sourcepub const fn as_distance(&self) -> Option<&DistanceInfo>
pub const fn as_distance(&self) -> Option<&DistanceInfo>
Returns the component distance subject, if this measurement uses project coupling.
Trait Implementations§
Source§impl Clone for MetricSubject
impl Clone for MetricSubject
Source§fn clone(&self) -> MetricSubject
fn clone(&self) -> MetricSubject
Returns a copy 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 MetricSubject
impl Debug for MetricSubject
Source§impl PartialEq for MetricSubject
impl PartialEq for MetricSubject
impl Eq for MetricSubject
impl StructuralPartialEq for MetricSubject
Auto Trait Implementations§
impl Freeze for MetricSubject
impl RefUnwindSafe for MetricSubject
impl Send for MetricSubject
impl Sync for MetricSubject
impl Unpin for MetricSubject
impl UnwindSafe for MetricSubject
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.