pub struct ModularTraitAnalyzer { /* private fields */ }Expand description
Trait analyzer for extracting trait information from Rust code
Implementations§
Source§impl TraitAnalyzer
impl TraitAnalyzer
Sourcepub fn new(config: GeneratorConfig) -> TraitAnalyzer
pub fn new(config: GeneratorConfig) -> TraitAnalyzer
Create a new trait analyzer with the given configuration
Sourcepub fn analyze_traits(
&mut self,
_crate_info: &CrateInfo,
) -> Result<Vec<TraitInfo>, SklearsError>
pub fn analyze_traits( &mut self, _crate_info: &CrateInfo, ) -> Result<Vec<TraitInfo>, SklearsError>
Analyze traits from crate information
Sourcepub fn analyze_trait(
&mut self,
trait_name: &str,
) -> Result<Option<TraitInfo>, SklearsError>
pub fn analyze_trait( &mut self, trait_name: &str, ) -> Result<Option<TraitInfo>, SklearsError>
Analyze a specific trait by name
Sourcepub fn get_cached_traits(&self) -> &HashMap<String, TraitInfo>
pub fn get_cached_traits(&self) -> &HashMap<String, TraitInfo>
Get all cached trait information
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the trait cache
Sourcepub fn validate_hierarchy_depth(&self, depth: usize) -> Result<(), SklearsError>
pub fn validate_hierarchy_depth(&self, depth: usize) -> Result<(), SklearsError>
Validate trait hierarchy depth
Trait Implementations§
Source§impl Clone for TraitAnalyzer
impl Clone for TraitAnalyzer
Source§fn clone(&self) -> TraitAnalyzer
fn clone(&self) -> TraitAnalyzer
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 TraitAnalyzer
impl Debug for TraitAnalyzer
Source§impl Default for TraitAnalyzer
impl Default for TraitAnalyzer
Source§fn default() -> TraitAnalyzer
fn default() -> TraitAnalyzer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TraitAnalyzer
impl RefUnwindSafe for TraitAnalyzer
impl Send for TraitAnalyzer
impl Sync for TraitAnalyzer
impl Unpin for TraitAnalyzer
impl UnwindSafe for TraitAnalyzer
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> 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