Type Alias rustc_middle::query::queries::associated_items::ProvidedValue
source · pub type ProvidedValue<'tcx> = AssocItems;Expand description
This type alias specifies the type returned from query providers and the type
used for decoding. For regular queries this is the declared returned type V,
but arena_cache will use <V as Deref>::Target instead.
Implementations§
source§impl AssocItems
impl AssocItems
sourcepub fn new(items_in_def_order: impl IntoIterator<Item = AssocItem>) -> Self
pub fn new(items_in_def_order: impl IntoIterator<Item = AssocItem>) -> Self
Constructs an AssociatedItems map from a series of ty::AssocItems in definition order.
sourcepub fn in_definition_order(&self) -> impl '_ + Iterator<Item = &AssocItem>
pub fn in_definition_order(&self) -> impl '_ + Iterator<Item = &AssocItem>
Returns a slice of associated items in the order they were defined.
New code should avoid relying on definition order. If you need a particular associated item for a known trait, make that trait a lang item instead of indexing this array.
pub fn len(&self) -> usize
sourcepub fn filter_by_name_unhygienic(
&self,
name: Symbol
) -> impl '_ + Iterator<Item = &AssocItem>
pub fn filter_by_name_unhygienic( &self, name: Symbol ) -> impl '_ + Iterator<Item = &AssocItem>
Returns an iterator over all associated items with the given name, ignoring hygiene.
sourcepub fn find_by_name_and_kind(
&self,
tcx: TyCtxt<'_>,
ident: Ident,
kind: AssocKind,
parent_def_id: DefId
) -> Option<&AssocItem>
pub fn find_by_name_and_kind( &self, tcx: TyCtxt<'_>, ident: Ident, kind: AssocKind, parent_def_id: DefId ) -> Option<&AssocItem>
Returns the associated item with the given name and AssocKind, if one exists.
Trait Implementations§
source§impl Clone for AssocItems
impl Clone for AssocItems
source§fn clone(&self) -> AssocItems
fn clone(&self) -> AssocItems
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for AssocItems
impl Debug for AssocItems
source§impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for AssocItems
impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for AssocItems
fn hash_stable( &self, __hcx: &mut StableHashingContext<'__ctx>, __hasher: &mut StableHasher )
source§impl PartialEq<AssocItems> for AssocItems
impl PartialEq<AssocItems> for AssocItems
source§fn eq(&self, other: &AssocItems) -> bool
fn eq(&self, other: &AssocItems) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for AssocItems
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