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 moresourceimpl 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) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + 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
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>
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 moreimpl 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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: U::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U using CastTo.