rustc_mir_build::build

Type Alias CaptureMap

Source
type CaptureMap<'tcx> = SortedIndexMultiMap<usize, HirId, Capture<'tcx>>;

Aliased Type§

struct CaptureMap<'tcx> { /* private fields */ }

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 48 bytes

Implementations

Source§

impl<I, K, V> SortedIndexMultiMap<I, K, V>
where I: Idx, K: Ord,

Source

pub fn new() -> SortedIndexMultiMap<I, K, V>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn into_iter(self) -> impl DoubleEndedIterator

Returns an iterator over the items in the map in insertion order.

Source

pub fn into_iter_enumerated(self) -> impl DoubleEndedIterator

Returns an iterator over the items in the map in insertion order along with their indices.

Source

pub fn iter(&self) -> impl DoubleEndedIterator

Returns an iterator over the items in the map in insertion order.

Source

pub fn iter_enumerated(&self) -> impl DoubleEndedIterator

Returns an iterator over the items in the map in insertion order along with their indices.

Source

pub fn get(&self, idx: I) -> Option<&(K, V)>

Returns the item in the map with the given index.

Source

pub fn get_by_key(&self, key: K) -> impl Iterator<Item = &V>

Returns an iterator over the items in the map that are equal to key.

If there are multiple items that are equivalent to key, they will be yielded in insertion order.

Source

pub fn get_by_key_enumerated(&self, key: K) -> impl Iterator<Item = (I, &V)>

Returns an iterator over the items in the map that are equal to key along with their indices.

If there are multiple items that are equivalent to key, they will be yielded in insertion order.

Source

pub fn contains_key(&self, key: K) -> bool

Trait Implementations

Source§

impl<I, K, V> Clone for SortedIndexMultiMap<I, K, V>
where I: Clone + Idx, K: Clone, V: Clone,

Source§

fn clone(&self) -> SortedIndexMultiMap<I, K, V>

Returns a copy of the value. Read more
Source§

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

Performs copy-assignment from source. Read more
Source§

impl<I, K, V> Debug for SortedIndexMultiMap<I, K, V>
where I: Debug + Idx, K: Debug, V: Debug,

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<I, K, V> FromIterator<(K, V)> for SortedIndexMultiMap<I, K, V>
where I: Idx, K: Ord,

Source§

fn from_iter<J>(iter: J) -> SortedIndexMultiMap<I, K, V>
where J: IntoIterator<Item = (K, V)>,

Creates a value from an iterator. Read more
Source§

impl<I, K, V> Hash for SortedIndexMultiMap<I, K, V>
where I: Idx, K: Hash, V: Hash,

Source§

fn hash<H>(&self, hasher: &mut H)
where H: Hasher,

Feeds this value into the given Hasher. Read more
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
Source§

impl<I, K, V, C> HashStable<C> for SortedIndexMultiMap<I, K, V>
where I: Idx, K: HashStable<C>, V: HashStable<C>,

Source§

fn hash_stable(&self, ctx: &mut C, hasher: &mut StableHasher<SipHasher128>)

Source§

impl<I, K, V> Index<I> for SortedIndexMultiMap<I, K, V>
where I: Idx,

Source§

type Output = V

The returned type after indexing.
Source§

fn index(&self, idx: I) -> &V

Performs the indexing (container[index]) operation. Read more
Source§

impl<I, K, V> PartialEq for SortedIndexMultiMap<I, K, V>
where I: Idx, K: PartialEq, V: PartialEq,

Source§

fn eq(&self, other: &SortedIndexMultiMap<I, K, V>) -> bool

Tests for self and other values to be equal, and is used by ==.
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.
Source§

impl<I, K, V> Eq for SortedIndexMultiMap<I, K, V>
where I: Idx, K: Eq, V: Eq,