pub struct GenericAnalyzer { /* private fields */ }
Expand description
Generic type analysis system
Implementations§
Source§impl GenericAnalyzer
impl GenericAnalyzer
Sourcepub fn track_generic_instantiation(
&self,
base_type: &str,
type_params: Vec<String>,
ptr: usize,
)
pub fn track_generic_instantiation( &self, base_type: &str, type_params: Vec<String>, ptr: usize, )
Track a generic type instantiation
Sourcepub fn track_generic_instantiation_with_name(
&self,
name: &str,
base_type: &str,
type_params: Vec<String>,
ptr: usize,
)
pub fn track_generic_instantiation_with_name( &self, name: &str, base_type: &str, type_params: Vec<String>, ptr: usize, )
Track a generic type instantiation with variable name
Sourcepub fn track_type_alias_instantiation(
&self,
alias_name: &str,
underlying_type: &str,
type_params: Vec<String>,
ptr: usize,
)
pub fn track_type_alias_instantiation( &self, alias_name: &str, underlying_type: &str, type_params: Vec<String>, ptr: usize, )
Track a type alias instantiation
Sourcepub fn analyze_constraints(&self, type_name: &str) -> Vec<GenericConstraint>
pub fn analyze_constraints(&self, type_name: &str) -> Vec<GenericConstraint>
Analyze generic constraints for a type
Sourcepub fn check_constraint_violations(
&self,
type_name: &str,
actual_params: &[String],
) -> Vec<ConstraintViolation>
pub fn check_constraint_violations( &self, type_name: &str, actual_params: &[String], ) -> Vec<ConstraintViolation>
Check for constraint violations
Sourcepub fn get_generic_statistics(&self) -> GenericStatistics
pub fn get_generic_statistics(&self) -> GenericStatistics
Get statistics about generic usage
Sourcepub fn get_type_aliases(&self) -> Vec<TypeAliasInfo>
pub fn get_type_aliases(&self) -> Vec<TypeAliasInfo>
Get all type aliases and their underlying types
Sourcepub fn resolve_type_alias(&self, alias_name: &str) -> Option<String>
pub fn resolve_type_alias(&self, alias_name: &str) -> Option<String>
Resolve a type alias to its underlying type
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for GenericAnalyzer
impl RefUnwindSafe for GenericAnalyzer
impl Send for GenericAnalyzer
impl Sync for GenericAnalyzer
impl Unpin for GenericAnalyzer
impl UnwindSafe for GenericAnalyzer
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> 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