Struct rustc_metadata::rmeta::decoder::DecodeContext
source · [−]pub(super) struct DecodeContext<'a, 'tcx> {
opaque: Decoder<'a>,
cdata: Option<CrateMetadataRef<'a>>,
blob: &'a MetadataBlob,
sess: Option<&'tcx Session>,
tcx: Option<TyCtxt<'tcx>>,
last_source_file_index: usize,
lazy_state: LazyState,
alloc_decoding_session: Option<AllocDecodingSession<'a>>,
}
Fields
opaque: Decoder<'a>
cdata: Option<CrateMetadataRef<'a>>
blob: &'a MetadataBlob
sess: Option<&'tcx Session>
tcx: Option<TyCtxt<'tcx>>
last_source_file_index: usize
lazy_state: LazyState
alloc_decoding_session: Option<AllocDecodingSession<'a>>
Implementations
sourceimpl<'a, 'tcx> DecodeContext<'a, 'tcx>
impl<'a, 'tcx> DecodeContext<'a, 'tcx>
fn tcx(&self) -> TyCtxt<'tcx>
pub fn blob(&self) -> &'a MetadataBlob
pub fn cdata(&self) -> CrateMetadataRef<'a>
fn map_encoded_cnum_to_current(&self, cnum: CrateNum) -> CrateNum
fn read_lazy_with_meta<T: ?Sized + LazyMeta>(
&mut self,
meta: T::Meta
) -> Lazy<T>
pub fn read_raw_bytes(&mut self, len: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
Trait Implementations
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for ProcMacroData
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for ProcMacroData
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for CrateRoot<'tcx>
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for CrateRoot<'tcx>
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for TraitImpls
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for TraitImpls
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for IncoherentImpls
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for IncoherentImpls
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for LazyTables<'tcx>
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for LazyTables<'tcx>
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for EntryKind
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for EntryKind
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for AssocFnData
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for AssocFnData
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for CrateNum
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for CrateNum
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> CrateNum
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for DefIndex
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for DefIndex
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> DefIndex
sourceimpl<'a, 'tcx, I: Idx, T> Decodable<DecodeContext<'a, 'tcx>> for Lazy<Table<I, T>> where
Option<T>: FixedSizeEncoding,
impl<'a, 'tcx, I: Idx, T> Decodable<DecodeContext<'a, 'tcx>> for Lazy<Table<I, T>> where
Option<T>: FixedSizeEncoding,
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Self
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for DefPathHashMapRef<'static>
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for DefPathHashMapRef<'static>
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> DefPathHashMapRef<'static>
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for ExpnIndex
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for ExpnIndex
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> ExpnIndex
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for SyntaxContext
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for SyntaxContext
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> SyntaxContext
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for ExpnId
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for ExpnId
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> ExpnId
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for Span
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for Span
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Span
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for &'tcx [Node<'tcx>]
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for &'tcx [Node<'tcx>]
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> Self
sourceimpl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for &'tcx [(Predicate<'tcx>, Span)]
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for &'tcx [(Predicate<'tcx>, Span)]
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> Self
sourceimpl<'a, 'tcx, T: Decodable<DecodeContext<'a, 'tcx>>> Decodable<DecodeContext<'a, 'tcx>> for Lazy<T>
impl<'a, 'tcx, T: Decodable<DecodeContext<'a, 'tcx>>> Decodable<DecodeContext<'a, 'tcx>> for Lazy<T>
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Self
sourceimpl<'a, 'tcx, T: Decodable<DecodeContext<'a, 'tcx>>> Decodable<DecodeContext<'a, 'tcx>> for Lazy<[T]>
impl<'a, 'tcx, T: Decodable<DecodeContext<'a, 'tcx>>> Decodable<DecodeContext<'a, 'tcx>> for Lazy<[T]>
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Self
sourceimpl<'a, 'tcx> Decoder for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> Decoder for DecodeContext<'a, 'tcx>
fn read_u128(&mut self) -> u128
fn read_u64(&mut self) -> u64
fn read_u32(&mut self) -> u32
fn read_u16(&mut self) -> u16
fn read_u8(&mut self) -> u8
fn read_usize(&mut self) -> usize
fn read_i128(&mut self) -> i128
fn read_i64(&mut self) -> i64
fn read_i32(&mut self) -> i32
fn read_i16(&mut self) -> i16
fn read_i8(&mut self) -> i8
fn read_isize(&mut self) -> isize
fn read_bool(&mut self) -> bool
fn read_f64(&mut self) -> f64
fn read_f32(&mut self) -> f32
fn read_char(&mut self) -> char
fn read_str(&mut self) -> &str
fn read_raw_bytes(&mut self, len: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
sourceimpl<'a, 'tcx> TyDecoder<'tcx> for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> TyDecoder<'tcx> for DecodeContext<'a, 'tcx>
const CLEAR_CROSS_CRATE: bool = true
fn tcx(&self) -> TyCtxt<'tcx>
fn peek_byte(&self) -> u8
fn position(&self) -> usize
fn cached_ty_for_shorthand<F>(
&mut self,
shorthand: usize,
or_insert_with: F
) -> Ty<'tcx> where
F: FnOnce(&mut Self) -> Ty<'tcx>,
fn with_position<F, R>(&mut self, pos: usize, f: F) -> R where
F: FnOnce(&mut Self) -> R,
fn decode_alloc_id(&mut self) -> AllocId
fn positioned_at_shorthand(&self) -> bool
Auto Trait Implementations
impl<'a, 'tcx> !RefUnwindSafe for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> !Send for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> !Sync for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> Unpin for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> !UnwindSafe for DecodeContext<'a, 'tcx>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for T where
T: ?Sized,
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