pub struct FileHealth {
pub functions: Vec<FunctionCognitive>,
pub naming: Vec<NamingFinding>,
}Expand description
Combined per-file health: cognitive scores plus naming findings. This is the
single entry point used by the edit-gate, read annotations, and the
ctx_quality tool.
Fields§
§functions: Vec<FunctionCognitive>§naming: Vec<NamingFinding>Implementations§
Source§impl FileHealth
impl FileHealth
Sourcepub fn over_threshold(
&self,
threshold: u32,
) -> impl Iterator<Item = &FunctionCognitive>
pub fn over_threshold( &self, threshold: u32, ) -> impl Iterator<Item = &FunctionCognitive>
Functions whose cognitive complexity exceeds threshold.
Sourcepub fn worst_cognitive(&self) -> u32
pub fn worst_cognitive(&self) -> u32
The single worst cognitive complexity in the file (0 if none).
Trait Implementations§
Source§impl Clone for FileHealth
impl Clone for FileHealth
Source§fn clone(&self) -> FileHealth
fn clone(&self) -> FileHealth
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FileHealth
impl Debug for FileHealth
Source§impl Default for FileHealth
impl Default for FileHealth
Source§fn default() -> FileHealth
fn default() -> FileHealth
Returns the “default value” for a type. Read more
Source§impl PartialEq for FileHealth
impl PartialEq for FileHealth
Source§impl Serialize for FileHealth
impl Serialize for FileHealth
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for FileHealth
Auto Trait Implementations§
impl Forget for FileHealth
impl Freeze for FileHealthwhere
*const u8 is !null: Freeze,
PhantomData<FunctionCognitive>: Freeze,
PhantomData<NamingFinding>: Freeze,
impl Move for FileHealth
impl RefUnwindSafe for FileHealth
impl Send for FileHealthwhere
RawVecInner: Send,
impl Sync for FileHealthwhere
RawVecInner: Sync,
impl Unpin for FileHealth
impl UnsafeUnpin for FileHealthwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<FunctionCognitive>: UnsafeUnpin,
PhantomData<NamingFinding>: UnsafeUnpin,
impl UnwindSafe for FileHealthwhere
RawVecInner: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more