pub type Value<'tcx> = AssocItem;

Aliased Type§

struct Value<'tcx> {
    pub def_id: DefId,
    pub name: Symbol,
    pub kind: AssocKind,
    pub container: AssocItemContainer,
    pub trait_item_def_id: Option<DefId>,
    pub fn_has_self_parameter: bool,
    pub opt_rpitit_info: Option<ImplTraitInTraitData>,
}

Fields§

§def_id: DefId§name: Symbol§kind: AssocKind§container: AssocItemContainer§trait_item_def_id: Option<DefId>

If this is an item in an impl of a trait then this is the DefId of the associated item on the trait that this implements.

§fn_has_self_parameter: bool

Whether this is a method with an explicit self as its first parameter, allowing method calls.

§opt_rpitit_info: Option<ImplTraitInTraitData>

Some if the associated item (an associated type) comes from the return-position impl Trait in trait desugaring. The ImplTraitInTraitData provides additional information about its source.

Implementations§

source§

impl AssocItem

source

pub fn ident(&self, tcx: TyCtxt<'_>) -> Ident

source

pub fn defaultness(&self, tcx: TyCtxt<'_>) -> Defaultness

Gets the defaultness of the associated item. To get the default associated type, use the type_of query on the DefId of the type.

source

pub fn visibility(&self, tcx: TyCtxt<'_>) -> Visibility<DefId>

source

pub fn container_id(&self, tcx: TyCtxt<'_>) -> DefId

source

pub fn trait_container(&self, tcx: TyCtxt<'_>) -> Option<DefId>

source

pub fn impl_container(&self, tcx: TyCtxt<'_>) -> Option<DefId>

source

pub fn signature(&self, tcx: TyCtxt<'_>) -> String

source

pub fn is_impl_trait_in_trait(&self) -> bool

Trait Implementations§

source§

impl Clone for AssocItem

source§

fn clone(&self) -> AssocItem

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 AssocItem

source§

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

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

impl<__D: Decoder> Decodable<__D> for AssocItem

source§

fn decode(__decoder: &mut __D) -> Self

source§

impl<__E: Encoder> Encodable<__E> for AssocItem

source§

fn encode(&self, __encoder: &mut __E)

source§

impl EraseType for AssocItem

§

type Result = [u8; 40]

source§

impl Hash for AssocItem

source§

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

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

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

source§

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

source§

impl PartialEq<AssocItem> for AssocItem

source§

fn eq(&self, other: &AssocItem) -> 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<'tcx> TypeFoldable<TyCtxt<'tcx>> for AssocItem

source§

fn try_fold_with<F: FallibleTypeFolder<TyCtxt<'tcx>>>( self, _: &mut F ) -> Result<Self, F::Error>

The entry point for folding. To fold a value t with a folder f call: t.try_fold_with(f). Read more
source§

fn fold_with<F: TypeFolder<TyCtxt<'tcx>>>(self, _: &mut F) -> Self

A convenient alternative to try_fold_with for use with infallible folders. Do not override this method, to ensure coherence with try_fold_with.
source§

impl<'tcx> TypeVisitable<TyCtxt<'tcx>> for AssocItem

source§

fn visit_with<F: TypeVisitor<TyCtxt<'tcx>>>( &self, _: &mut F ) -> ControlFlow<F::BreakTy>

The entry point for visiting. To visit a value t with a visitor v call: t.visit_with(v). Read more
source§

impl Copy for AssocItem

source§

impl Eq for AssocItem

source§

impl StructuralEq for AssocItem

source§

impl StructuralPartialEq for AssocItem

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:40 bytes