Trait rustc_trait_selection::infer::canonical::ir::codec::TyEncoder

source ·
pub trait TyEncoder: SpanEncoder {
    type I: Interner;

    const CLEAR_CROSS_CRATE: bool;

    // Required methods
    fn position(&self) -> usize;
    fn type_shorthands(
        &mut self,
    ) -> &mut HashMap<<Self::I as Interner>::Ty, usize, BuildHasherDefault<FxHasher>>;
    fn predicate_shorthands(
        &mut self,
    ) -> &mut HashMap<PredicateKind<Self::I>, usize, BuildHasherDefault<FxHasher>>;
    fn encode_alloc_id(&mut self, alloc_id: &<Self::I as Interner>::AllocId);
}

Required Associated Types§

Required Associated Constants§

Required Methods§

source

fn position(&self) -> usize

source

fn type_shorthands( &mut self, ) -> &mut HashMap<<Self::I as Interner>::Ty, usize, BuildHasherDefault<FxHasher>>

source

fn predicate_shorthands( &mut self, ) -> &mut HashMap<PredicateKind<Self::I>, usize, BuildHasherDefault<FxHasher>>

source

fn encode_alloc_id(&mut self, alloc_id: &<Self::I as Interner>::AllocId)

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, 'tcx> TyEncoder for CacheEncoder<'a, 'tcx>

Implementors§