Struct chalk_ir::CanonicalVarKinds
source · [−]pub struct CanonicalVarKinds<I: Interner> { /* private fields */ }
Expand description
List of interned elements.
Implementations
sourceimpl<I: Interner> CanonicalVarKinds<I>
impl<I: Interner> CanonicalVarKinds<I>
sourcepub fn interned(&self) -> &I::InternedCanonicalVarKinds
pub fn interned(&self) -> &I::InternedCanonicalVarKinds
Get the interned elements.
sourcepub fn as_slice(&self, interner: I) -> &[CanonicalVarKind<I>]
pub fn as_slice(&self, interner: I) -> &[CanonicalVarKind<I>]
Returns a slice containing the elements.
sourcepub fn at(&self, interner: I, index: usize) -> &CanonicalVarKind<I>
pub fn at(&self, interner: I, index: usize) -> &CanonicalVarKind<I>
Index into the sequence.
sourcepub fn iter(&self, interner: I) -> Iter<'_, CanonicalVarKind<I>>
pub fn iter(&self, interner: I) -> Iter<'_, CanonicalVarKind<I>>
Get an iterator over the elements of the sequence.
sourceimpl<I: Interner> CanonicalVarKinds<I>
impl<I: Interner> CanonicalVarKinds<I>
sourcepub fn from_fallible<E>(
interner: I,
elements: impl IntoIterator<Item = Result<impl CastTo<CanonicalVarKind<I>>, E>>
) -> Result<Self, E>
pub fn from_fallible<E>(
interner: I,
elements: impl IntoIterator<Item = Result<impl CastTo<CanonicalVarKind<I>>, E>>
) -> Result<Self, E>
Tries to create a sequence using an iterator of element-like things.
sourcepub fn from_iter(
interner: I,
elements: impl IntoIterator<Item = impl CastTo<CanonicalVarKind<I>>>
) -> Self
pub fn from_iter(
interner: I,
elements: impl IntoIterator<Item = impl CastTo<CanonicalVarKind<I>>>
) -> Self
Create a sequence from elements
sourcepub fn from1(interner: I, element: impl CastTo<CanonicalVarKind<I>>) -> Self
pub fn from1(interner: I, element: impl CastTo<CanonicalVarKind<I>>) -> Self
Create a sequence from a single element.
Trait Implementations
sourceimpl<I: Interner> CastTo<CanonicalVarKinds<I>> for CanonicalVarKinds<I>
impl<I: Interner> CastTo<CanonicalVarKinds<I>> for CanonicalVarKinds<I>
sourcefn cast_to(
self,
_interner: <CanonicalVarKinds<I> as HasInterner>::Interner
) -> CanonicalVarKinds<I>
fn cast_to(
self,
_interner: <CanonicalVarKinds<I> as HasInterner>::Interner
) -> CanonicalVarKinds<I>
Cast a value to type T
.
sourceimpl<I: Clone + Interner> Clone for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Clone,
impl<I: Clone + Interner> Clone for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Clone,
sourcefn clone(&self) -> CanonicalVarKinds<I>
fn clone(&self) -> CanonicalVarKinds<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 CanonicalVarKinds<I>
impl<I: Interner> Debug for CanonicalVarKinds<I>
sourceimpl<I: Interner> HasInterner for CanonicalVarKinds<I>
impl<I: Interner> HasInterner for CanonicalVarKinds<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Hash + Interner> Hash for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Hash,
impl<I: Hash + Interner> Hash for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Hash,
sourceimpl<I: Ord + Interner> Ord for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Ord,
impl<I: Ord + Interner> Ord for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Ord,
sourcefn cmp(&self, other: &CanonicalVarKinds<I>) -> Ordering
fn cmp(&self, other: &CanonicalVarKinds<I>) -> 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<I: PartialEq + Interner> PartialEq<CanonicalVarKinds<I>> for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: PartialEq,
impl<I: PartialEq + Interner> PartialEq<CanonicalVarKinds<I>> for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: PartialEq,
sourcefn eq(&self, other: &CanonicalVarKinds<I>) -> bool
fn eq(&self, other: &CanonicalVarKinds<I>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &CanonicalVarKinds<I>) -> bool
fn ne(&self, other: &CanonicalVarKinds<I>) -> bool
This method tests for !=
.
sourceimpl<I: PartialOrd + Interner> PartialOrd<CanonicalVarKinds<I>> for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: PartialOrd,
impl<I: PartialOrd + Interner> PartialOrd<CanonicalVarKinds<I>> for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: PartialOrd,
sourcefn partial_cmp(&self, other: &CanonicalVarKinds<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &CanonicalVarKinds<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 CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Copy,
impl<I: Eq + Interner> Eq for CanonicalVarKinds<I> where
I::InternedCanonicalVarKinds: Eq,
impl<I: Interner> StructuralEq for CanonicalVarKinds<I>
impl<I: Interner> StructuralPartialEq for CanonicalVarKinds<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for CanonicalVarKinds<I> where
<I as Interner>::InternedCanonicalVarKinds: RefUnwindSafe,
impl<I> Send for CanonicalVarKinds<I> where
<I as Interner>::InternedCanonicalVarKinds: Send,
impl<I> Sync for CanonicalVarKinds<I> where
<I as Interner>::InternedCanonicalVarKinds: Sync,
impl<I> Unpin for CanonicalVarKinds<I> where
<I as Interner>::InternedCanonicalVarKinds: Unpin,
impl<I> UnwindSafe for CanonicalVarKinds<I> where
<I as Interner>::InternedCanonicalVarKinds: 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
.