pub struct ScoreComponents {
pub doc_score: f64,
pub readme_score: f64,
pub import_score: f64,
pub path_score: f64,
pub test_link_score: f64,
pub churn_score: f64,
pub final_score: f64,
pub centrality_score: f64,
pub entrypoint_score: f64,
pub examples_score: f64,
}Expand description
Individual components of the heuristic scoring system
Fields§
§doc_score: f64Documentation score (presence of comments, docstrings)
readme_score: f64README/documentation file score
import_score: f64Import/dependency score (how much this file is imported)
path_score: f64Path depth score (penalize deeply nested files)
test_link_score: f64Test linkage score (proximity to tests)
churn_score: f64Code churn score (git activity)
final_score: f64Final weighted score
centrality_score: f64PageRank centrality score
entrypoint_score: f64Entrypoint detection score
examples_score: f64Examples/usage score
Implementations§
Source§impl ScoreComponents
impl ScoreComponents
Sourcepub fn zero() -> ScoreComponents
pub fn zero() -> ScoreComponents
Create a new ScoreComponents with all scores at zero
Sourcepub fn compute_final_score(&mut self, weights: &HeuristicWeights)
pub fn compute_final_score(&mut self, weights: &HeuristicWeights)
Compute final score using provided weights
Trait Implementations§
Source§impl Clone for ScoreComponents
impl Clone for ScoreComponents
Source§fn clone(&self) -> ScoreComponents
fn clone(&self) -> ScoreComponents
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 ScoreComponents
impl Debug for ScoreComponents
Source§impl<'de> Deserialize<'de> for ScoreComponents
impl<'de> Deserialize<'de> for ScoreComponents
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScoreComponents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ScoreComponents, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScoreComponents
impl PartialEq for ScoreComponents
Source§impl Serialize for ScoreComponents
impl Serialize for ScoreComponents
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 ScoreComponents
Auto Trait Implementations§
impl Freeze for ScoreComponents
impl RefUnwindSafe for ScoreComponents
impl Send for ScoreComponents
impl Sync for ScoreComponents
impl Unpin for ScoreComponents
impl UnwindSafe for ScoreComponents
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 more