Struct chalk_ir::ConcreteConst
source · [−]pub struct ConcreteConst<I: Interner> {
pub interned: I::InternedConcreteConst,
}
Expand description
Concrete constant, whose value is known (as opposed to inferred constants and placeholders).
Fields
interned: I::InternedConcreteConst
The interned constant.
Implementations
sourceimpl<I: Interner> ConcreteConst<I>
impl<I: Interner> ConcreteConst<I>
sourcepub fn const_eq(
&self,
ty: &Ty<I>,
other: &ConcreteConst<I>,
interner: I
) -> bool
pub fn const_eq(
&self,
ty: &Ty<I>,
other: &ConcreteConst<I>,
interner: I
) -> bool
Checks whether two concrete constants are equal.
Trait Implementations
sourceimpl<I: Clone + Interner> Clone for ConcreteConst<I> where
I::InternedConcreteConst: Clone,
impl<I: Clone + Interner> Clone for ConcreteConst<I> where
I::InternedConcreteConst: Clone,
sourcefn clone(&self) -> ConcreteConst<I>
fn clone(&self) -> ConcreteConst<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> Debug for ConcreteConst<I>
impl<I: Interner> Debug for ConcreteConst<I>
sourceimpl<I: Interner> HasInterner for ConcreteConst<I>
impl<I: Interner> HasInterner for ConcreteConst<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Hash + Interner> Hash for ConcreteConst<I> where
I::InternedConcreteConst: Hash,
impl<I: Hash + Interner> Hash for ConcreteConst<I> where
I::InternedConcreteConst: Hash,
sourceimpl<I: Ord + Interner> Ord for ConcreteConst<I> where
I::InternedConcreteConst: Ord,
impl<I: Ord + Interner> Ord for ConcreteConst<I> where
I::InternedConcreteConst: Ord,
sourceimpl<I: PartialEq + Interner> PartialEq<ConcreteConst<I>> for ConcreteConst<I> where
I::InternedConcreteConst: PartialEq,
impl<I: PartialEq + Interner> PartialEq<ConcreteConst<I>> for ConcreteConst<I> where
I::InternedConcreteConst: PartialEq,
sourcefn eq(&self, other: &ConcreteConst<I>) -> bool
fn eq(&self, other: &ConcreteConst<I>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ConcreteConst<I>) -> bool
fn ne(&self, other: &ConcreteConst<I>) -> bool
This method tests for !=
.
sourceimpl<I: PartialOrd + Interner> PartialOrd<ConcreteConst<I>> for ConcreteConst<I> where
I::InternedConcreteConst: PartialOrd,
impl<I: PartialOrd + Interner> PartialOrd<ConcreteConst<I>> for ConcreteConst<I> where
I::InternedConcreteConst: PartialOrd,
sourcefn partial_cmp(&self, other: &ConcreteConst<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &ConcreteConst<I>) -> 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<I: Copy + Interner> Copy for ConcreteConst<I> where
I::InternedConcreteConst: Copy,
impl<I: Eq + Interner> Eq for ConcreteConst<I> where
I::InternedConcreteConst: Eq,
impl<I: Interner> StructuralEq for ConcreteConst<I>
impl<I: Interner> StructuralPartialEq for ConcreteConst<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for ConcreteConst<I> where
<I as Interner>::InternedConcreteConst: RefUnwindSafe,
impl<I> Send for ConcreteConst<I> where
<I as Interner>::InternedConcreteConst: Send,
impl<I> Sync for ConcreteConst<I> where
<I as Interner>::InternedConcreteConst: Sync,
impl<I> Unpin for ConcreteConst<I> where
<I as Interner>::InternedConcreteConst: Unpin,
impl<I> UnwindSafe for ConcreteConst<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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more