pub trait TyDecoder<'tcx>: SpanDecoder {
const CLEAR_CROSS_CRATE: bool;
// Required methods
fn interner(&self) -> TyCtxt<'tcx>;
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;
// Provided method
fn positioned_at_shorthand(&self) -> bool { ... }
}
Required Associated Constants§
const CLEAR_CROSS_CRATE: bool
Required Methods§
fn interner(&self) -> TyCtxt<'tcx>
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
Provided Methods§
fn positioned_at_shorthand(&self) -> bool
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.