pub struct TraitExplorer { /* private fields */ }Expand description
Main trait explorer for analyzing trait relationships and usage
Implementations§
Source§impl TraitExplorer
impl TraitExplorer
Sourcepub fn new(config: ExplorerConfig) -> Result<TraitExplorer, SklearsError>
pub fn new(config: ExplorerConfig) -> Result<TraitExplorer, SklearsError>
Create a new trait explorer with configuration
Sourcepub fn load_from_crate(&mut self, crate_name: &str) -> Result<(), SklearsError>
pub fn load_from_crate(&mut self, crate_name: &str) -> Result<(), SklearsError>
Load trait information from the current crate
Sourcepub fn explore_trait(
&mut self,
trait_name: &str,
) -> Result<TraitExplorationResult, SklearsError>
pub fn explore_trait( &mut self, trait_name: &str, ) -> Result<TraitExplorationResult, SklearsError>
Explore a specific trait and its relationships
Sourcepub fn explore_all_traits(
&mut self,
) -> Result<Vec<TraitExplorationResult>, SklearsError>
pub fn explore_all_traits( &mut self, ) -> Result<Vec<TraitExplorationResult>, SklearsError>
Explore all traits in the registry
Sourcepub fn generate_full_trait_graph(&self) -> Result<TraitGraph, SklearsError>
pub fn generate_full_trait_graph(&self) -> Result<TraitGraph, SklearsError>
Generate a comprehensive trait relationship graph
Sourcepub fn find_similar_traits(
&self,
trait_name: &str,
similarity_threshold: f64,
) -> Result<Vec<SimilarTrait>, SklearsError>
pub fn find_similar_traits( &self, trait_name: &str, similarity_threshold: f64, ) -> Result<Vec<SimilarTrait>, SklearsError>
Find traits that are similar to a given trait
Sourcepub fn get_metrics(&self) -> &ExplorationMetrics
pub fn get_metrics(&self) -> &ExplorationMetrics
Get exploration metrics
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear analysis cache
Sourcepub fn config(&self) -> &ExplorerConfig
pub fn config(&self) -> &ExplorerConfig
Get configuration
Sourcepub fn calculate_complexity_score(
&self,
trait_info: &TraitInfo,
dependencies: &DependencyAnalysis,
) -> f64
pub fn calculate_complexity_score( &self, trait_info: &TraitInfo, dependencies: &DependencyAnalysis, ) -> f64
Calculate complexity score for a trait
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TraitExplorer
impl RefUnwindSafe for TraitExplorer
impl Send for TraitExplorer
impl Sync for TraitExplorer
impl Unpin for TraitExplorer
impl UnwindSafe for TraitExplorer
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> 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