Struct chalk_ir::CanonicalVarKinds
source · pub struct CanonicalVarKinds<I: Interner> {
pub(crate) interned: I::InternedCanonicalVarKinds,
}
Expand description
List of interned elements.
Fields§
§interned: I::InternedCanonicalVarKinds
Implementations§
source§impl<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.
source§impl<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§
source§impl<I: Interner> CastTo<CanonicalVarKinds<I>> for CanonicalVarKinds<I>
impl<I: Interner> CastTo<CanonicalVarKinds<I>> for CanonicalVarKinds<I>
source§fn 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
.source§impl<I: Clone + Interner> Clone for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: Clone,
impl<I: Clone + Interner> Clone for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: Clone,
source§fn clone(&self) -> CanonicalVarKinds<I>
fn clone(&self) -> CanonicalVarKinds<I>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<I: Interner> Debug for CanonicalVarKinds<I>
impl<I: Interner> Debug for CanonicalVarKinds<I>
source§impl<I: Interner> HasInterner for CanonicalVarKinds<I>
impl<I: Interner> HasInterner for CanonicalVarKinds<I>
source§impl<I: Hash + Interner> Hash for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: Hash,
impl<I: Hash + Interner> Hash for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: Hash,
source§impl<I: Ord + Interner> Ord for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: Ord,
impl<I: Ord + Interner> Ord for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: Ord,
source§fn cmp(&self, other: &CanonicalVarKinds<I>) -> Ordering
fn cmp(&self, other: &CanonicalVarKinds<I>) -> Ordering
1.21.0 · source§fn 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
source§impl<I: PartialEq + Interner> PartialEq for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: PartialEq,
impl<I: PartialEq + Interner> PartialEq for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: PartialEq,
source§fn 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 ==
.source§impl<I: PartialOrd + Interner> PartialOrd for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: PartialOrd,
impl<I: PartialOrd + Interner> PartialOrd for CanonicalVarKinds<I>where
I::InternedCanonicalVarKinds: PartialOrd,
source§fn partial_cmp(&self, other: &CanonicalVarKinds<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &CanonicalVarKinds<I>) -> Option<Ordering>
1.0.0 · source§fn 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<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> StructuralPartialEq for CanonicalVarKinds<I>
Auto Trait Implementations§
impl<I> Freeze for CanonicalVarKinds<I>
impl<I> RefUnwindSafe for CanonicalVarKinds<I>
impl<I> Send for CanonicalVarKinds<I>
impl<I> Sync for CanonicalVarKinds<I>
impl<I> Unpin for CanonicalVarKinds<I>
impl<I> UnwindSafe for CanonicalVarKinds<I>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)