Trait rustc_middle::ty::codec::RefDecodable

source ·
pub trait RefDecodable<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> {
    // Required method
    fn decode(d: &mut D) -> &'tcx Self;
}
Expand description

Trait for decoding to a reference.

This is a separate trait from Decodable so that we can implement it for upstream types, such as FxHashSet.

The TyDecodable derive macro will use this trait for fields that are references (and don’t use a type alias to hide that).

Decodable can still be implemented in cases where Decodable is required by a trait bound.

Required Methods§

source

fn decode(d: &mut D) -> &'tcx Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for (ExportedSymbol<'tcx>, SymbolExportInfo)

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for InlineAsmTemplatePiece

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for Attribute

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for UnordMap<DefId, EarlyBinder<'tcx, Ty<'tcx>>>

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for UnordSet<LocalDefId>

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for IndexVec<Promoted, Body<'tcx>>

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for DefId

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for LocalDefId

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for Span

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for Ident

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for DocLinkResMap

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [(ExportedSymbol<'tcx>, SymbolExportInfo)]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [(Clause<'tcx>, Span)]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [InlineAsmTemplatePiece]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [ImplSource<'tcx, ()>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [ValTree<'tcx>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [Variance]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [Attribute]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [UnordMap<DefId, EarlyBinder<'tcx, Ty<'tcx>>>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [UnordSet<LocalDefId>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [IndexVec<Promoted, Body<'tcx>>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [DefId]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [LocalDefId]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [Span]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [Ident]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [CodeRegion]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [BorrowCheckResult<'tcx>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [Body<'tcx>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [Graph]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [AdtDefData]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [DeducedParamAttrs]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [TypeckResults<'tcx>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [DocLinkResMap]

source§

fn decode(decoder: &mut D) -> &'tcx Self

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for [FxIndexSet<ItemLocalId>]

source§

fn decode(decoder: &mut D) -> &'tcx Self

Implementors§

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for ImplSource<'tcx, ()>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for Variance

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for CodeRegion

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for BorrowCheckResult<'tcx>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for Body<'tcx>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for Graph

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for AdtDefData

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for DeducedParamAttrs

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for TypeckResults<'tcx>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for FxIndexSet<ItemLocalId>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<(VariantIdx, FieldIdx)>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<BoundVariableKind>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<LocalDefId>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<FieldIdx>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<Const<'tcx>>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<Ty<'tcx>>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for List<PolyExistentialPredicate<'tcx>>

source§

impl<'tcx, D: TyDecoder<I = TyCtxt<'tcx>>> RefDecodable<'tcx, D> for ListWithCachedTypeInfo<Clause<'tcx>>