pub struct VariableKinds<I: Interner> { /* private fields */ }Expand description
List of interned elements.
Implementations§
Source§impl<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.
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 duplicate 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§impl<I: PartialOrd + Interner> PartialOrd for VariableKinds<I>where
I::InternedVariableKinds: PartialOrd,
impl<I: PartialOrd + Interner> PartialOrd for VariableKinds<I>where
I::InternedVariableKinds: PartialOrd,
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> 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