[−][src]Struct chalk_ir::Variances
List of variable kinds with universe index. Wraps InternedCanonicalVarKinds
.
Implementations
impl<I: Interner> Variances<I>
[src]
pub fn empty(interner: &I) -> Self
[src]
Creates an empty list of canonical variable kinds.
pub fn interned(&self) -> &I::InternedVariances
[src]
Get the interned canonical variable kinds.
pub fn from(interner: &I, variances: impl IntoIterator<Item = Variance>) -> Self
[src]
Creates a list of canonical variable kinds using an iterator.
pub fn from_fallible<E>(
interner: &I,
variances: impl IntoIterator<Item = Result<Variance, E>>
) -> Result<Self, E>
[src]
interner: &I,
variances: impl IntoIterator<Item = Result<Variance, E>>
) -> Result<Self, E>
Tries to create a list of canonical variable kinds using an iterator.
pub fn from1(interner: &I, variance: Variance) -> Self
[src]
Creates a list of canonical variable kinds from a single canonical variable kind.
pub fn iter(&self, interner: &I) -> Iter<'_, Variance>
[src]
Get an iterator over the list of canonical variable kinds.
pub fn is_empty(&self, interner: &I) -> bool
[src]
Checks whether the list of canonical variable kinds is empty.
pub fn len(&self, interner: &I) -> usize
[src]
Returns the number of canonical variable kinds.
pub fn as_slice(&self, interner: &I) -> &[Variance]
[src]
Returns a slice containing the canonical variable kinds.
Trait Implementations
impl<I: Clone + Interner> Clone for Variances<I> where
I::InternedVariances: Clone,
[src]
I::InternedVariances: Clone,
impl<I: Copy + Interner> Copy for Variances<I> where
I::InternedVariances: Copy,
[src]
I::InternedVariances: Copy,
impl<I: Interner> Debug for Variances<I>
[src]
impl<I: Eq + Interner> Eq for Variances<I> where
I::InternedVariances: Eq,
[src]
I::InternedVariances: Eq,
impl<I: Interner> HasInterner for Variances<I>
[src]
type Interner = I
The interner associated with the type.
impl<I: Hash + Interner> Hash for Variances<I> where
I::InternedVariances: Hash,
[src]
I::InternedVariances: Hash,
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<I: Ord + Interner> Ord for Variances<I> where
I::InternedVariances: Ord,
[src]
I::InternedVariances: Ord,
pub fn cmp(&self, other: &Variances<I>) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl<I: PartialEq + Interner> PartialEq<Variances<I>> for Variances<I> where
I::InternedVariances: PartialEq,
[src]
I::InternedVariances: PartialEq,
pub fn eq(&self, other: &Variances<I>) -> bool
[src]
pub fn ne(&self, other: &Variances<I>) -> bool
[src]
impl<I: PartialOrd + Interner> PartialOrd<Variances<I>> for Variances<I> where
I::InternedVariances: PartialOrd,
[src]
I::InternedVariances: PartialOrd,
pub fn partial_cmp(&self, other: &Variances<I>) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Variances<I>) -> bool
[src]
pub fn le(&self, other: &Variances<I>) -> bool
[src]
pub fn gt(&self, other: &Variances<I>) -> bool
[src]
pub fn ge(&self, other: &Variances<I>) -> bool
[src]
impl<I: Interner> StructuralEq for Variances<I>
[src]
impl<I: Interner> StructuralPartialEq for Variances<I>
[src]
Auto Trait Implementations
impl<I> RefUnwindSafe for Variances<I> where
<I as Interner>::InternedVariances: RefUnwindSafe,
[src]
<I as Interner>::InternedVariances: RefUnwindSafe,
impl<I> Send for Variances<I> where
<I as Interner>::InternedVariances: Send,
[src]
<I as Interner>::InternedVariances: Send,
impl<I> Sync for Variances<I> where
<I as Interner>::InternedVariances: Sync,
[src]
<I as Interner>::InternedVariances: Sync,
impl<I> Unpin for Variances<I> where
<I as Interner>::InternedVariances: Unpin,
[src]
<I as Interner>::InternedVariances: Unpin,
impl<I> UnwindSafe for Variances<I> where
<I as Interner>::InternedVariances: UnwindSafe,
[src]
<I as Interner>::InternedVariances: 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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Cast for T
[src]
pub 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.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,