Struct chalk_ir::VariableKinds
source · pub struct VariableKinds<I: Interner> {
pub(crate) interned: I::InternedVariableKinds,
}
Expand description
List of interned elements.
Fields§
§interned: I::InternedVariableKinds
Implementations§
source§impl<I: Interner> VariableKinds<I>
impl<I: Interner> VariableKinds<I>
fn debug(&self) -> VariableKindsDebug<'_, I>
sourcepub fn inner_debug(&self, interner: I) -> VariableKindsInnerDebug<'_, I>
pub fn inner_debug(&self, interner: I) -> VariableKindsInnerDebug<'_, I>
Helper method for debugging variable kinds.
source§impl<I: Interner> VariableKinds<I>
impl<I: Interner> VariableKinds<I>
sourcepub fn interned(&self) -> &I::InternedVariableKinds
pub fn interned(&self) -> &I::InternedVariableKinds
Get the interned elements.
sourcepub fn as_slice(&self, interner: I) -> &[VariableKind<I>]
pub fn as_slice(&self, interner: I) -> &[VariableKind<I>]
Returns a slice containing the elements.
sourcepub fn at(&self, interner: I, index: usize) -> &VariableKind<I>
pub fn at(&self, interner: I, index: usize) -> &VariableKind<I>
Index into the sequence.
sourcepub fn iter(&self, interner: I) -> Iter<'_, VariableKind<I>>
pub fn iter(&self, interner: I) -> Iter<'_, VariableKind<I>>
Get an iterator over the elements of the sequence.
source§impl<I: Interner> VariableKinds<I>
impl<I: Interner> VariableKinds<I>
sourcepub fn from_fallible<E>(
interner: I,
elements: impl IntoIterator<Item = Result<impl CastTo<VariableKind<I>>, E>>,
) -> Result<Self, E>
pub fn from_fallible<E>( interner: I, elements: impl IntoIterator<Item = Result<impl CastTo<VariableKind<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<VariableKind<I>>>,
) -> Self
pub fn from_iter( interner: I, elements: impl IntoIterator<Item = impl CastTo<VariableKind<I>>>, ) -> Self
Create a sequence from elements
sourcepub fn from1(interner: I, element: impl CastTo<VariableKind<I>>) -> Self
pub fn from1(interner: I, element: impl CastTo<VariableKind<I>>) -> Self
Create a sequence from a single element.
Trait Implementations§
source§impl<I: Interner> CastTo<VariableKinds<I>> for VariableKinds<I>
impl<I: Interner> CastTo<VariableKinds<I>> for VariableKinds<I>
source§fn cast_to(
self,
_interner: <VariableKinds<I> as HasInterner>::Interner,
) -> VariableKinds<I>
fn cast_to( self, _interner: <VariableKinds<I> as HasInterner>::Interner, ) -> VariableKinds<I>
Cast a value to type
T
.source§impl<I: Clone + Interner> Clone for VariableKinds<I>where
I::InternedVariableKinds: Clone,
impl<I: Clone + Interner> Clone for VariableKinds<I>where
I::InternedVariableKinds: Clone,
source§fn clone(&self) -> VariableKinds<I>
fn clone(&self) -> VariableKinds<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> HasInterner for VariableKinds<I>
impl<I: Interner> HasInterner for VariableKinds<I>
source§impl<I: Hash + Interner> Hash for VariableKinds<I>where
I::InternedVariableKinds: Hash,
impl<I: Hash + Interner> Hash for VariableKinds<I>where
I::InternedVariableKinds: Hash,
source§impl<I: Ord + Interner> Ord for VariableKinds<I>where
I::InternedVariableKinds: Ord,
impl<I: Ord + Interner> Ord for VariableKinds<I>where
I::InternedVariableKinds: Ord,
source§fn cmp(&self, other: &VariableKinds<I>) -> Ordering
fn cmp(&self, other: &VariableKinds<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 VariableKinds<I>where
I::InternedVariableKinds: PartialEq,
impl<I: PartialEq + Interner> PartialEq for VariableKinds<I>where
I::InternedVariableKinds: PartialEq,
source§fn eq(&self, other: &VariableKinds<I>) -> bool
fn eq(&self, other: &VariableKinds<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<I: PartialOrd + Interner> PartialOrd for VariableKinds<I>where
I::InternedVariableKinds: PartialOrd,
impl<I: PartialOrd + Interner> PartialOrd for VariableKinds<I>where
I::InternedVariableKinds: PartialOrd,
source§fn partial_cmp(&self, other: &VariableKinds<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &VariableKinds<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 VariableKinds<I>where
I::InternedVariableKinds: Copy,
impl<I: Eq + Interner> Eq for VariableKinds<I>where
I::InternedVariableKinds: Eq,
impl<I: Interner> StructuralPartialEq for VariableKinds<I>
Auto Trait Implementations§
impl<I> Freeze for VariableKinds<I>
impl<I> RefUnwindSafe for VariableKinds<I>
impl<I> Send for VariableKinds<I>
impl<I> Sync for VariableKinds<I>
impl<I> Unpin for VariableKinds<I>
impl<I> UnwindSafe for VariableKinds<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
)