pub struct GenericAnalyzer {
pub generic_instances: Mutex<HashMap<String, Vec<GenericInstance>>>,
pub constraint_violations: Mutex<Vec<ConstraintViolation>>,
pub instantiation_events: Mutex<Vec<InstantiationEvent>>,
}Fields§
§generic_instances: Mutex<HashMap<String, Vec<GenericInstance>>>§constraint_violations: Mutex<Vec<ConstraintViolation>>§instantiation_events: Mutex<Vec<InstantiationEvent>>Implementations§
Source§impl GenericAnalyzer
impl GenericAnalyzer
pub fn new() -> Self
pub fn track_generic_instantiation( &self, 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, )
pub fn track_type_alias_instantiation( &self, alias_name: &str, underlying_type: &str, type_params: Vec<String>, ptr: usize, )
pub fn analyze_constraints(&self, type_name: &str) -> Vec<GenericConstraint>
pub fn check_constraint_violations( &self, type_name: &str, actual_params: &[String], ) -> Vec<ConstraintViolation>
pub fn get_generic_statistics(&self) -> GenericStatistics
pub fn get_type_aliases(&self) -> Vec<TypeAliasInfo>
pub fn resolve_type_alias(&self, alias_name: &str) -> Option<String>
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 UnsafeUnpin 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