Struct chalk_ir::InferenceVar
source · [−]pub struct InferenceVar { /* private fields */ }
Expand description
A type, lifetime or constant whose value is being inferred.
Implementations
sourceimpl InferenceVar
impl InferenceVar
sourcepub fn to_ty<I: Interner>(self, interner: I, kind: TyVariableKind) -> Ty<I>
pub fn to_ty<I: Interner>(self, interner: I, kind: TyVariableKind) -> Ty<I>
Wraps the inference variable in a type.
sourcepub fn to_lifetime<I: Interner>(self, interner: I) -> Lifetime<I>
pub fn to_lifetime<I: Interner>(self, interner: I) -> Lifetime<I>
Wraps the inference variable in a lifetime.
Trait Implementations
sourceimpl Clone for InferenceVar
impl Clone for InferenceVar
sourcefn clone(&self) -> InferenceVar
fn clone(&self) -> InferenceVar
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for InferenceVar
impl Debug for InferenceVar
sourceimpl From<u32> for InferenceVar
impl From<u32> for InferenceVar
sourcefn from(index: u32) -> InferenceVar
fn from(index: u32) -> InferenceVar
Converts to this type from the input type.
sourceimpl Hash for InferenceVar
impl Hash for InferenceVar
sourceimpl Ord for InferenceVar
impl Ord for InferenceVar
sourcefn cmp(&self, other: &InferenceVar) -> Ordering
fn cmp(&self, other: &InferenceVar) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<InferenceVar> for InferenceVar
impl PartialEq<InferenceVar> for InferenceVar
sourcefn eq(&self, other: &InferenceVar) -> bool
fn eq(&self, other: &InferenceVar) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &InferenceVar) -> bool
fn ne(&self, other: &InferenceVar) -> bool
This method tests for !=
.
sourceimpl PartialOrd<InferenceVar> for InferenceVar
impl PartialOrd<InferenceVar> for InferenceVar
sourcefn partial_cmp(&self, other: &InferenceVar) -> Option<Ordering>
fn partial_cmp(&self, other: &InferenceVar) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for InferenceVar
impl Eq for InferenceVar
impl StructuralEq for InferenceVar
impl StructuralPartialEq for InferenceVar
Auto Trait Implementations
impl RefUnwindSafe for InferenceVar
impl Send for InferenceVar
impl Sync for InferenceVar
impl Unpin for InferenceVar
impl UnwindSafe for InferenceVar
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Cast for T
impl<T> Cast for T
sourcefn cast<U>(self, interner: U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
Cast a value to type U
using CastTo
.