Enum chalk_ir::ConstValue
source · [−]pub enum ConstValue<I: Interner> {
BoundVar(BoundVar),
InferenceVar(InferenceVar),
Placeholder(PlaceholderIndex),
Concrete(ConcreteConst<I>),
}
Expand description
A constant value, not necessarily concrete.
Variants
BoundVar(BoundVar)
Bound var (e.g. a parameter).
InferenceVar(InferenceVar)
Constant whose value is being inferred.
Placeholder(PlaceholderIndex)
Lifetime on some yet-unknown placeholder.
Concrete(ConcreteConst<I>)
Concrete constant value.
Trait Implementations
sourceimpl<I: Clone + Interner> Clone for ConstValue<I>
impl<I: Clone + Interner> Clone for ConstValue<I>
sourcefn clone(&self) -> ConstValue<I>
fn clone(&self) -> ConstValue<I>
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<I: Interner> HasInterner for ConstValue<I>
impl<I: Interner> HasInterner for ConstValue<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Hash + Interner> Hash for ConstValue<I>
impl<I: Hash + Interner> Hash for ConstValue<I>
sourceimpl<I: PartialEq + Interner> PartialEq<ConstValue<I>> for ConstValue<I>
impl<I: PartialEq + Interner> PartialEq<ConstValue<I>> for ConstValue<I>
sourcefn eq(&self, other: &ConstValue<I>) -> bool
fn eq(&self, other: &ConstValue<I>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ConstValue<I>) -> bool
fn ne(&self, other: &ConstValue<I>) -> bool
This method tests for !=
.
impl<I: Interner> Copy for ConstValue<I> where
I::InternedConcreteConst: Copy,
impl<I: Eq + Interner> Eq for ConstValue<I>
impl<I: Interner> StructuralEq for ConstValue<I>
impl<I: Interner> StructuralPartialEq for ConstValue<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for ConstValue<I> where
<I as Interner>::InternedConcreteConst: RefUnwindSafe,
impl<I> Send for ConstValue<I> where
<I as Interner>::InternedConcreteConst: Send,
impl<I> Sync for ConstValue<I> where
<I as Interner>::InternedConcreteConst: Sync,
impl<I> Unpin for ConstValue<I> where
<I as Interner>::InternedConcreteConst: Unpin,
impl<I> UnwindSafe for ConstValue<I> where
<I as Interner>::InternedConcreteConst: UnwindSafe,
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
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more