Trait rustc_middle::ty::codec::RefDecodable[][src]

pub trait RefDecodable<'tcx, D: TyDecoder<'tcx>> {
    fn decode(d: &mut D) -> Result<&'tcx Self, D::Error>;
}
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

fn decode(d: &mut D) -> Result<&'tcx Self, D::Error>[src]

Implementations on Foreign Types

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [ValTree<'tcx>][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [(Predicate<'tcx>, Span)][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [Node<'tcx>][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [NodeId][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [Body<'tcx>][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

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

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

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

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [TypeckResults<'tcx>][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [BorrowCheckResult<'tcx>][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [UnsafetyCheckResult][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [CodeRegion][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for InlineAsmTemplatePiece[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [InlineAsmTemplatePiece][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for Span[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [Span][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for FxHashSet<LocalDefId>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for [FxHashSet<LocalDefId>][src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

Implementors

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for CodeRegion[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for Allocation[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for BorrowCheckResult<'tcx>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for UnsafetyCheckResult[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for Body<'tcx>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for AdtDef[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for Const<'tcx>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for TypeckResults<'tcx>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for List<BoundVariableKind>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for List<Binder<'tcx, ExistentialPredicate<'tcx>>>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]

impl<'tcx, D: TyDecoder<'tcx>> RefDecodable<'tcx, D> for List<Ty<'tcx>>[src]

fn decode(decoder: &mut D) -> Result<&'tcx Self, D::Error>[src]