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

source

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.

source

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.

source

pub fn len(&self) -> usize

source

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.

source

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.

source

pub fn find_by_name_and_kinds( &self, tcx: TyCtxt<'_>, ident: Ident, kinds: &[AssocKind], parent_def_id: DefId ) -> Option<&AssocItem>

Returns the associated item with the given name and any of AssocKind, if one exists.

source

pub fn find_by_name_and_namespace( &self, tcx: TyCtxt<'_>, ident: Ident, ns: Namespace, parent_def_id: DefId ) -> Option<&AssocItem>

Returns the associated item with the given name in the given Namespace, if one exists.

Trait Implementations§

source§

impl Clone for AssocItems

source§

fn clone(&self) -> AssocItems

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
source§

impl Debug for AssocItems

source§

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

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

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for AssocItems

source§

fn hash_stable( &self, __hcx: &mut StableHashingContext<'__ctx>, __hasher: &mut StableHasher )

source§

impl PartialEq<AssocItems> for AssocItems

source§

fn eq(&self, other: &AssocItems) -> bool

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

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

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

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