pub(super) struct DecodeContext<'a, 'tcx> {
opaque: MemDecoder<'a>,
cdata: Option<CrateMetadataRef<'a>>,
blob: &'a MetadataBlob,
sess: Option<&'tcx Session>,
tcx: Option<TyCtxt<'tcx>>,
lazy_state: LazyState,
alloc_decoding_session: Option<AllocDecodingSession<'a>>,
}
Fields§
§opaque: MemDecoder<'a>
§cdata: Option<CrateMetadataRef<'a>>
§blob: &'a MetadataBlob
§sess: Option<&'tcx Session>
§tcx: Option<TyCtxt<'tcx>>
§lazy_state: LazyState
§alloc_decoding_session: Option<AllocDecodingSession<'a>>
Implementations§
Source§impl<'a, 'tcx> DecodeContext<'a, 'tcx>
impl<'a, 'tcx> DecodeContext<'a, 'tcx>
fn tcx(&self) -> TyCtxt<'tcx>
pub(crate) fn blob(&self) -> &'a MetadataBlob
fn cdata(&self) -> CrateMetadataRef<'a>
fn map_encoded_cnum_to_current(&self, cnum: CrateNum) -> CrateNum
fn read_lazy_offset_then<T>(&mut self, f: impl Fn(NonZero<usize>) -> T) -> T
fn read_lazy<T>(&mut self) -> LazyValue<T>
fn read_lazy_array<T>(&mut self, len: usize) -> LazyArray<T>
fn read_lazy_table<I, T>(&mut self, width: usize, len: usize) -> LazyTable<I, T>
fn read_raw_bytes(&mut self, len: usize) -> &[u8] ⓘ
Trait Implementations§
Source§impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for CrateHeader
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for CrateHeader
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
Source§impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for CrateRoot
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for CrateRoot
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
Source§impl<'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
Source§impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for LazyTables
impl<'tcx, '__a> Decodable<DecodeContext<'__a, 'tcx>> for LazyTables
fn decode(__decoder: &mut DecodeContext<'__a, 'tcx>) -> Self
Source§impl<'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
Source§impl<'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
Source§impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for &'tcx [(Clause<'tcx>, Span)]
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for &'tcx [(Clause<'tcx>, Span)]
fn decode(d: &mut DecodeContext<'a, 'tcx>) -> Self
Source§impl<'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>
Source§impl<'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
Source§impl<'a, 'tcx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyArray<T>
impl<'a, 'tcx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyArray<T>
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Self
Source§impl<'a, 'tcx, I: Idx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyTable<I, T>
impl<'a, 'tcx, I: Idx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyTable<I, T>
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Self
Source§impl<'a, 'tcx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyValue<T>
impl<'a, 'tcx, T> Decodable<DecodeContext<'a, 'tcx>> for LazyValue<T>
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> Self
Source§impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for SpanData
impl<'a, 'tcx> Decodable<DecodeContext<'a, 'tcx>> for SpanData
fn decode(decoder: &mut DecodeContext<'a, 'tcx>) -> SpanData
Source§impl<'a, 'tcx> Decoder for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> Decoder for DecodeContext<'a, 'tcx>
fn read_usize(&mut self) -> usize
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_isize(&mut self) -> isize
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_raw_bytes(&mut self, len: usize) -> &[u8] ⓘ
fn peek_byte(&self) -> u8
fn position(&self) -> usize
fn read_i8(&mut self) -> i8
fn read_bool(&mut self) -> bool
fn read_char(&mut self) -> char
fn read_str(&mut self) -> &str
Source§impl<'a, 'tcx> SpanDecoder for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> SpanDecoder for DecodeContext<'a, 'tcx>
fn decode_attr_id(&mut self) -> AttrId
fn decode_crate_num(&mut self) -> CrateNum
fn decode_def_index(&mut self) -> DefIndex
fn decode_def_id(&mut self) -> DefId
fn decode_syntax_context(&mut self) -> SyntaxContext
fn decode_expn_id(&mut self) -> ExpnId
fn decode_span(&mut self) -> Span
fn decode_symbol(&mut self) -> Symbol
Source§impl<'a, 'tcx> TyDecoder for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> TyDecoder for DecodeContext<'a, 'tcx>
const CLEAR_CROSS_CRATE: bool = true
type I = TyCtxt<'tcx>
fn interner(&self) -> Self::I
fn cached_ty_for_shorthand<F>( &mut self, shorthand: usize, or_insert_with: F, ) -> Ty<'tcx>
fn with_position<F, R>(&mut self, pos: usize, f: F) -> Rwhere
F: FnOnce(&mut Self) -> R,
fn decode_alloc_id(&mut self) -> AllocId
fn positioned_at_shorthand(&self) -> bool
Auto Trait Implementations§
impl<'a, 'tcx> !DynSend for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> !DynSync for DecodeContext<'a, 'tcx>
impl<'a, 'tcx> Freeze for DecodeContext<'a, 'tcx>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
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: 88 bytes