Struct rustc_query_impl::on_disk_cache::CacheDecoder [−][src]
pub struct CacheDecoder<'a, 'tcx> {
tcx: TyCtxt<'tcx>,
opaque: Decoder<'a>,
source_map: &'a SourceMap,
file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>,
file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, EncodedSourceFileId>,
alloc_decoding_session: AllocDecodingSession<'a>,
syntax_contexts: &'a FxHashMap<u32, AbsoluteBytePos>,
expn_data: &'a UnhashMap<ExpnHash, AbsoluteBytePos>,
foreign_expn_data: &'a UnhashMap<ExpnHash, u32>,
hygiene_context: &'a HygieneDecodeContext,
}
Expand description
A decoder that can read from the incremental compilation cache. It is similar to the one
we use for crate metadata decoding in that it can rebase spans and eventually
will also handle things that contain Ty
instances.
Fields
tcx: TyCtxt<'tcx>
opaque: Decoder<'a>
source_map: &'a SourceMap
file_index_to_file: &'a Lock<FxHashMap<SourceFileIndex, Lrc<SourceFile>>>
file_index_to_stable_id: &'a FxHashMap<SourceFileIndex, EncodedSourceFileId>
alloc_decoding_session: AllocDecodingSession<'a>
syntax_contexts: &'a FxHashMap<u32, AbsoluteBytePos>
expn_data: &'a UnhashMap<ExpnHash, AbsoluteBytePos>
foreign_expn_data: &'a UnhashMap<ExpnHash, u32>
hygiene_context: &'a HygieneDecodeContext
Implementations
Trait Implementations
fn read_enum<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_enum_variant<T, F>(
&mut self,
_names: &[&str],
f: F
) -> Result<T, Self::Error> where
F: FnMut(&mut Self, usize) -> Result<T, Self::Error>,
fn read_enum_variant_arg<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_struct<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_struct_field<T, F>(
&mut self,
_f_name: &str,
f: F
) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_tuple<T, F>(&mut self, _len: usize, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_tuple_arg<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_option<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnMut(&mut Self, bool) -> Result<T, Self::Error>,
fn read_seq<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self, usize) -> Result<T, Self::Error>,
fn read_seq_elt<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self) -> Result<T, Self::Error>,
fn read_map<T, F>(&mut self, f: F) -> Result<T, Self::Error> where
F: FnOnce(&mut Self, usize) -> Result<T, Self::Error>,
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for CacheDecoder<'a, 'tcx>
impl<'a, 'tcx> !Send for CacheDecoder<'a, 'tcx>
impl<'a, 'tcx> !Sync for CacheDecoder<'a, 'tcx>
impl<'a, 'tcx> Unpin for CacheDecoder<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for CacheDecoder<'a, 'tcx>
Blanket Implementations
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: 104 bytes