Struct chalk_ir::VariableKinds
source · [−]pub struct VariableKinds<I: Interner> { /* private fields */ }
Expand description
List of interned elements.
Implementations
sourceimpl<I: Interner> VariableKinds<I>
impl<I: Interner> VariableKinds<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.
sourceimpl<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.
sourceimpl<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
sourceimpl<I: Interner> CastTo<VariableKinds<I>> for VariableKinds<I>
impl<I: Interner> CastTo<VariableKinds<I>> for VariableKinds<I>
sourcefn 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
.
sourceimpl<I: Clone + Interner> Clone for VariableKinds<I> where
I::InternedVariableKinds: Clone,
impl<I: Clone + Interner> Clone for VariableKinds<I> where
I::InternedVariableKinds: Clone,
sourcefn clone(&self) -> VariableKinds<I>
fn clone(&self) -> VariableKinds<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 VariableKinds<I>
impl<I: Interner> HasInterner for VariableKinds<I>
type Interner = I
type Interner = I
The interner associated with the type.
sourceimpl<I: Hash + Interner> Hash for VariableKinds<I> where
I::InternedVariableKinds: Hash,
impl<I: Hash + Interner> Hash for VariableKinds<I> where
I::InternedVariableKinds: Hash,
sourceimpl<I: Ord + Interner> Ord for VariableKinds<I> where
I::InternedVariableKinds: Ord,
impl<I: Ord + Interner> Ord for VariableKinds<I> where
I::InternedVariableKinds: Ord,
sourcefn cmp(&self, other: &VariableKinds<I>) -> Ordering
fn cmp(&self, other: &VariableKinds<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<VariableKinds<I>> for VariableKinds<I> where
I::InternedVariableKinds: PartialEq,
impl<I: PartialEq + Interner> PartialEq<VariableKinds<I>> for VariableKinds<I> where
I::InternedVariableKinds: PartialEq,
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &VariableKinds<I>) -> bool
fn ne(&self, other: &VariableKinds<I>) -> bool
This method tests for !=
.
sourceimpl<I: PartialOrd + Interner> PartialOrd<VariableKinds<I>> for VariableKinds<I> where
I::InternedVariableKinds: PartialOrd,
impl<I: PartialOrd + Interner> PartialOrd<VariableKinds<I>> for VariableKinds<I> where
I::InternedVariableKinds: PartialOrd,
sourcefn partial_cmp(&self, other: &VariableKinds<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &VariableKinds<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 VariableKinds<I> where
I::InternedVariableKinds: Copy,
impl<I: Eq + Interner> Eq for VariableKinds<I> where
I::InternedVariableKinds: Eq,
impl<I: Interner> StructuralEq for VariableKinds<I>
impl<I: Interner> StructuralPartialEq for VariableKinds<I>
Auto Trait Implementations
impl<I> RefUnwindSafe for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: RefUnwindSafe,
impl<I> Send for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: Send,
impl<I> Sync for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: Sync,
impl<I> Unpin for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: Unpin,
impl<I> UnwindSafe for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: 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
.