[−][src]Struct chalk_ir::VariableKinds
List of interned elements.
Implementations
impl<I: Interner> VariableKinds<I>
[src]
pub fn inner_debug<'a>(
&'a self,
interner: &'a I
) -> VariableKindsInnerDebug<'a, I>
[src]
&'a self,
interner: &'a I
) -> VariableKindsInnerDebug<'a, I>
Helper method for debugging variable kinds.
impl<I: Interner> VariableKinds<I>
[src]
pub fn interned(&self) -> &I::InternedVariableKinds
[src]
Get the interned elements.
impl<I: Interner> VariableKinds<I>
[src]
pub fn from_fallible<E>(
interner: &I,
elements: impl IntoIterator<Item = Result<impl CastTo<VariableKind<I>>, E>>
) -> Result<Self, E>
[src]
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.
pub fn as_slice(&self, interner: &I) -> &[VariableKind<I>]
[src]
Returns a slice containing the elements.
pub fn from_iter(
interner: &I,
elements: impl IntoIterator<Item = impl CastTo<VariableKind<I>>>
) -> Self
[src]
interner: &I,
elements: impl IntoIterator<Item = impl CastTo<VariableKind<I>>>
) -> Self
Create a sequence from elements
pub fn at(&self, interner: &I, index: usize) -> &VariableKind<I>
[src]
Index into the sequence.
pub fn from1(interner: &I, element: impl CastTo<VariableKind<I>>) -> Self
[src]
Create a sequence from a single element.
pub fn empty(interner: &I) -> Self
[src]
Create an empty sequence.
pub fn is_empty(&self, interner: &I) -> bool
[src]
Check whether this is an empty sequence.
pub fn iter(&self, interner: &I) -> Iter<'_, VariableKind<I>>
[src]
Get an iterator over the elements of the sequence.
pub fn len(&self, interner: &I) -> usize
[src]
Get the length of the sequence.
Trait Implementations
impl<I: Interner> CastTo<VariableKinds<I>> for VariableKinds<I>
[src]
fn cast_to(
self,
_interner: &<VariableKinds<I> as HasInterner>::Interner
) -> VariableKinds<I>
[src]
self,
_interner: &<VariableKinds<I> as HasInterner>::Interner
) -> VariableKinds<I>
impl<I: Clone + Interner> Clone for VariableKinds<I> where
I::InternedVariableKinds: Clone,
[src]
I::InternedVariableKinds: Clone,
fn clone(&self) -> VariableKinds<I>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<I: Copy + Interner> Copy for VariableKinds<I> where
I::InternedVariableKinds: Copy,
[src]
I::InternedVariableKinds: Copy,
impl<I: Eq + Interner> Eq for VariableKinds<I> where
I::InternedVariableKinds: Eq,
[src]
I::InternedVariableKinds: Eq,
impl<I: Interner> HasInterner for VariableKinds<I>
[src]
type Interner = I
The interner associated with the type.
impl<I: Hash + Interner> Hash for VariableKinds<I> where
I::InternedVariableKinds: Hash,
[src]
I::InternedVariableKinds: Hash,
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<I: Ord + Interner> Ord for VariableKinds<I> where
I::InternedVariableKinds: Ord,
[src]
I::InternedVariableKinds: Ord,
fn cmp(&self, other: &VariableKinds<I>) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<I: PartialEq + Interner> PartialEq<VariableKinds<I>> for VariableKinds<I> where
I::InternedVariableKinds: PartialEq,
[src]
I::InternedVariableKinds: PartialEq,
fn eq(&self, other: &VariableKinds<I>) -> bool
[src]
fn ne(&self, other: &VariableKinds<I>) -> bool
[src]
impl<I: PartialOrd + Interner> PartialOrd<VariableKinds<I>> for VariableKinds<I> where
I::InternedVariableKinds: PartialOrd,
[src]
I::InternedVariableKinds: PartialOrd,
fn partial_cmp(&self, other: &VariableKinds<I>) -> Option<Ordering>
[src]
fn lt(&self, other: &VariableKinds<I>) -> bool
[src]
fn le(&self, other: &VariableKinds<I>) -> bool
[src]
fn gt(&self, other: &VariableKinds<I>) -> bool
[src]
fn ge(&self, other: &VariableKinds<I>) -> bool
[src]
impl<I: Interner> StructuralEq for VariableKinds<I>
[src]
impl<I: Interner> StructuralPartialEq for VariableKinds<I>
[src]
Auto Trait Implementations
impl<I> RefUnwindSafe for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: RefUnwindSafe,
<I as Interner>::InternedVariableKinds: RefUnwindSafe,
impl<I> Send for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: Send,
<I as Interner>::InternedVariableKinds: Send,
impl<I> Sync for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: Sync,
<I as Interner>::InternedVariableKinds: Sync,
impl<I> Unpin for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: Unpin,
<I as Interner>::InternedVariableKinds: Unpin,
impl<I> UnwindSafe for VariableKinds<I> where
<I as Interner>::InternedVariableKinds: UnwindSafe,
<I as Interner>::InternedVariableKinds: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
[src]
fn cast<U>(self, interner: &U::Interner) -> U where
Self: CastTo<U>,
U: HasInterner,
[src]
Self: CastTo<U>,
U: HasInterner,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,