hir_ty

Type Alias CanonicalVarKinds

source
pub type CanonicalVarKinds = CanonicalVarKinds<Interner>;

Aliased Type§

struct CanonicalVarKinds { /* private fields */ }

Implementations

§

impl<I> CanonicalVarKinds<I>
where I: Interner,

pub fn from_fallible<E>( interner: I, elements: impl IntoIterator<Item = Result<impl CastTo<WithKind<I, UniverseIndex>>, E>>, ) -> Result<CanonicalVarKinds<I>, E>

Tries to create a sequence using an iterator of element-like things.

pub fn from_iter( interner: I, elements: impl IntoIterator<Item = impl CastTo<WithKind<I, UniverseIndex>>>, ) -> CanonicalVarKinds<I>

Create a sequence from elements

pub fn from1( interner: I, element: impl CastTo<WithKind<I, UniverseIndex>>, ) -> CanonicalVarKinds<I>

Create a sequence from a single element.

§

impl<I> CanonicalVarKinds<I>
where I: Interner,

pub fn interned(&self) -> &<I as Interner>::InternedCanonicalVarKinds

Get the interned elements.

pub fn as_slice(&self, interner: I) -> &[WithKind<I, UniverseIndex>]

Returns a slice containing the elements.

pub fn at(&self, interner: I, index: usize) -> &WithKind<I, UniverseIndex>

Index into the sequence.

pub fn empty(interner: I) -> CanonicalVarKinds<I>

Create an empty sequence.

pub fn is_empty(&self, interner: I) -> bool

Check whether this is an empty sequence.

pub fn iter(&self, interner: I) -> Iter<'_, WithKind<I, UniverseIndex>>

Get an iterator over the elements of the sequence.

pub fn len(&self, interner: I) -> usize

Get the length of the sequence.

Trait Implementations

§

impl<I> CastTo<CanonicalVarKinds<I>> for CanonicalVarKinds<I>
where I: Interner,

§

fn cast_to( self, _interner: <CanonicalVarKinds<I> as HasInterner>::Interner, ) -> CanonicalVarKinds<I>

Cast a value to type T.
§

impl<I> Clone for CanonicalVarKinds<I>
where I: Clone + Interner, <I as Interner>::InternedCanonicalVarKinds: Clone,

§

fn clone(&self) -> CanonicalVarKinds<I>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl<I> Debug for CanonicalVarKinds<I>
where I: Interner,

§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl<I> HasInterner for CanonicalVarKinds<I>
where I: Interner,

§

type Interner = I

The interner associated with the type.
§

impl<I> Hash for CanonicalVarKinds<I>
where I: Hash + Interner, <I as Interner>::InternedCanonicalVarKinds: Hash,

§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl<I> Ord for CanonicalVarKinds<I>
where I: Ord + Interner, <I as Interner>::InternedCanonicalVarKinds: Ord,

§

fn cmp(&self, other: &CanonicalVarKinds<I>) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl<I> PartialEq for CanonicalVarKinds<I>
where I: PartialEq + Interner, <I as Interner>::InternedCanonicalVarKinds: PartialEq,

§

fn eq(&self, other: &CanonicalVarKinds<I>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<I> PartialOrd for CanonicalVarKinds<I>
where I: PartialOrd + Interner, <I as Interner>::InternedCanonicalVarKinds: PartialOrd,

§

fn partial_cmp(&self, other: &CanonicalVarKinds<I>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl<I> Copy for CanonicalVarKinds<I>
where I: Copy + Interner, <I as Interner>::InternedCanonicalVarKinds: Copy,

§

impl<I> Eq for CanonicalVarKinds<I>
where I: Eq + Interner, <I as Interner>::InternedCanonicalVarKinds: Eq,

§

impl<I> StructuralPartialEq for CanonicalVarKinds<I>
where I: Interner,