[−][src]Trait rustc_middle::ty::codec::TyDecoder

pub trait TyDecoder<'tcx>: Decoder {
    pub const CLEAR_CROSS_CRATE: bool;

    pub fn tcx(&self) -> TyCtxt<'tcx>;
pub fn peek_byte(&self) -> u8;
pub fn position(&self) -> usize;
pub fn cached_ty_for_shorthand<F>(
        &mut self,
        shorthand: usize,
        or_insert_with: F
    ) -> Result<Ty<'tcx>, Self::Error>
    where
        F: FnOnce(&mut Self) -> Result<Ty<'tcx>, Self::Error>
;
pub fn with_position<F, R>(&mut self, pos: usize, f: F) -> R
    where
        F: FnOnce(&mut Self) -> R
;
pub fn map_encoded_cnum_to_current(&self, cnum: CrateNum) -> CrateNum;
pub fn decode_alloc_id(&mut self) -> Result<AllocId, Self::Error>; pub fn positioned_at_shorthand(&self) -> bool { ... } }

Associated Constants

pub const CLEAR_CROSS_CRATE: bool[src]

Loading content...

Required methods

pub fn tcx(&self) -> TyCtxt<'tcx>[src]

pub fn peek_byte(&self) -> u8[src]

pub fn position(&self) -> usize[src]

pub fn cached_ty_for_shorthand<F>(
    &mut self,
    shorthand: usize,
    or_insert_with: F
) -> Result<Ty<'tcx>, Self::Error> where
    F: FnOnce(&mut Self) -> Result<Ty<'tcx>, Self::Error>, 
[src]

pub fn with_position<F, R>(&mut self, pos: usize, f: F) -> R where
    F: FnOnce(&mut Self) -> R, 
[src]

pub fn map_encoded_cnum_to_current(&self, cnum: CrateNum) -> CrateNum[src]

pub fn decode_alloc_id(&mut self) -> Result<AllocId, Self::Error>[src]

Loading content...

Provided methods

pub fn positioned_at_shorthand(&self) -> bool[src]

Loading content...

Implementors

impl<'a, 'tcx> TyDecoder<'tcx> for CacheDecoder<'a, 'tcx>[src]

Loading content...