pub struct TypeEvolution {
pub variable: String,
pub initial_type: SemanticType,
pub evolved_fields: Vec<EvolvedField>,
}Expand description
Tracks how a variable’s type evolves through the program
Fields§
§variable: StringThe variable name being tracked
initial_type: SemanticTypeThe initial type when the variable was declared
evolved_fields: Vec<EvolvedField>Fields added through assignment operations (monotonic growth)
Implementations§
Source§impl TypeEvolution
impl TypeEvolution
Sourcepub fn new(variable: String, initial_type: SemanticType) -> Self
pub fn new(variable: String, initial_type: SemanticType) -> Self
Create a new type evolution tracker
Sourcepub fn add_field(
&mut self,
name: String,
field_type: SemanticType,
optional: bool,
depth: usize,
)
pub fn add_field( &mut self, name: String, field_type: SemanticType, optional: bool, depth: usize, )
Add a new field to the evolution
Sourcepub fn current_type(&self) -> SemanticType
pub fn current_type(&self) -> SemanticType
Get the current type including all evolved fields
Sourcepub fn to_canonical(&self) -> CanonicalType
pub fn to_canonical(&self) -> CanonicalType
Convert this evolution to a canonical type for JIT compilation
Trait Implementations§
Source§impl Clone for TypeEvolution
impl Clone for TypeEvolution
Source§fn clone(&self) -> TypeEvolution
fn clone(&self) -> TypeEvolution
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 moreAuto Trait Implementations§
impl Freeze for TypeEvolution
impl RefUnwindSafe for TypeEvolution
impl Send for TypeEvolution
impl Sync for TypeEvolution
impl Unpin for TypeEvolution
impl UnsafeUnpin for TypeEvolution
impl UnwindSafe for TypeEvolution
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