rustc_type_ir::codec

Trait 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 FxHashMap<<Self::I as Interner>::Ty, usize>;
    fn predicate_shorthands(
        &mut self,
    ) -> &mut FxHashMap<PredicateKind<Self::I>, usize>;
    fn encode_alloc_id(&mut self, alloc_id: &<Self::I as Interner>::AllocId);
}

Required Associated Constants§

Required Associated Types§

Required Methods§

source

fn position(&self) -> usize

source

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

source

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

source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§