Struct rustc_query_impl::on_disk_cache::CacheEncoder[][src]

pub struct CacheEncoder<'a, 'tcx, E: OpaqueEncoder> {
    tcx: TyCtxt<'tcx>,
    encoder: &'a mut E,
    type_shorthands: FxHashMap<Ty<'tcx>, usize>,
    predicate_shorthands: FxHashMap<PredicateKind<'tcx>, usize>,
    interpret_allocs: FxIndexSet<AllocId>,
    source_map: CachingSourceMapView<'tcx>,
    file_to_file_index: FxHashMap<*const SourceFile, SourceFileIndex>,
    hygiene_context: &'a HygieneEncodeContext,
}
Expand description

An encoder that can write to the incremental compilation cache.

Fields

tcx: TyCtxt<'tcx>encoder: &'a mut Etype_shorthands: FxHashMap<Ty<'tcx>, usize>predicate_shorthands: FxHashMap<PredicateKind<'tcx>, usize>interpret_allocs: FxIndexSet<AllocId>source_map: CachingSourceMapView<'tcx>file_to_file_index: FxHashMap<*const SourceFile, SourceFileIndex>hygiene_context: &'a HygieneEncodeContext

Implementations

Encode something with additional information that allows to do some sanity checks when decoding the data again. This method will first encode the specified tag, then the given value, then the number of bytes taken up by tag and value. On decoding, we can then verify that we get the expected tag and read the expected number of bytes.

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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