Struct cairo_lang_semantic::expr::inference::InferenceData
source · pub struct InferenceData {
pub inference_id: InferenceId,
pub type_assignment: HashMap<LocalTypeVarId, TypeId>,
pub const_assignment: HashMap<LocalConstVarId, ConstValueId>,
pub impl_assignment: HashMap<LocalImplVarId, ImplId>,
pub type_vars: Vec<TypeVar>,
pub const_vars: Vec<ConstVar>,
pub impl_vars: Vec<ImplVar>,
pub stable_ptrs: HashMap<InferenceVar, SyntaxStablePtrId>,
pub error_status: Result<(), InferenceErrorStatus>,
/* private fields */
}
Expand description
State of inference.
Fields§
§inference_id: InferenceId
§type_assignment: HashMap<LocalTypeVarId, TypeId>
Current inferred assignment for type variables.
const_assignment: HashMap<LocalConstVarId, ConstValueId>
Current inferred assignment for const variables.
impl_assignment: HashMap<LocalImplVarId, ImplId>
Current inferred assignment for impl variables.
type_vars: Vec<TypeVar>
Type variables.
const_vars: Vec<ConstVar>
Const variables.
impl_vars: Vec<ImplVar>
Impl variables.
stable_ptrs: HashMap<InferenceVar, SyntaxStablePtrId>
Mapping from variables to stable pointers, if exist.
error_status: Result<(), InferenceErrorStatus>
The current error status.
Implementations§
source§impl InferenceData
impl InferenceData
pub fn new(inference_id: InferenceId) -> Self
pub fn inference<'db, 'b: 'db>( &'db mut self, db: &'b dyn SemanticGroup ) -> Inference<'db>
pub fn clone_with_inference_id( &self, db: &dyn SemanticGroup, inference_id: InferenceId ) -> InferenceData
pub fn temporary_clone(&self) -> InferenceData
Trait Implementations§
source§impl Debug for InferenceData
impl Debug for InferenceData
source§impl<'a, T: ?Sized + Upcast<dyn SemanticGroup + 'static>> DebugWithDb<T> for InferenceData
impl<'a, T: ?Sized + Upcast<dyn SemanticGroup + 'static>> DebugWithDb<T> for InferenceData
source§impl PartialEq for InferenceData
impl PartialEq for InferenceData
source§fn eq(&self, other: &InferenceData) -> bool
fn eq(&self, other: &InferenceData) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for InferenceData
impl StructuralPartialEq for InferenceData
Auto Trait Implementations§
impl Freeze for InferenceData
impl RefUnwindSafe for InferenceData
impl Send for InferenceData
impl Sync for InferenceData
impl Unpin for InferenceData
impl UnwindSafe for InferenceData
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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