Trait rustc_metadata::rmeta::decoder::Metadata

source ·
pub(super) trait Metadata<'a, 'tcx>: Copy {
    // Required method
    fn blob(self) -> &'a MetadataBlob;

    // Provided methods
    fn cdata(self) -> Option<CrateMetadataRef<'a>> { ... }
    fn sess(self) -> Option<&'tcx Session> { ... }
    fn tcx(self) -> Option<TyCtxt<'tcx>> { ... }
    fn decoder(self, pos: usize) -> DecodeContext<'a, 'tcx> { ... }
}
Expand description

Abstract over the various ways one can create metadata decoders.

Required Methods§

source

fn blob(self) -> &'a MetadataBlob

Provided Methods§

source

fn cdata(self) -> Option<CrateMetadataRef<'a>>

source

fn sess(self) -> Option<&'tcx Session>

source

fn tcx(self) -> Option<TyCtxt<'tcx>>

source

fn decoder(self, pos: usize) -> DecodeContext<'a, 'tcx>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<'a, 'tcx> Metadata<'a, 'tcx> for (&'a MetadataBlob, &'tcx Session)

source§

fn blob(self) -> &'a MetadataBlob

source§

fn sess(self) -> Option<&'tcx Session>

source§

impl<'a, 'tcx> Metadata<'a, 'tcx> for (CrateMetadataRef<'a>, &'tcx Session)

source§

fn blob(self) -> &'a MetadataBlob

source§

fn cdata(self) -> Option<CrateMetadataRef<'a>>

source§

fn sess(self) -> Option<&'tcx Session>

source§

impl<'a, 'tcx> Metadata<'a, 'tcx> for (CrateMetadataRef<'a>, TyCtxt<'tcx>)

source§

fn blob(self) -> &'a MetadataBlob

source§

fn cdata(self) -> Option<CrateMetadataRef<'a>>

source§

fn tcx(self) -> Option<TyCtxt<'tcx>>

Implementors§

source§

impl<'a, 'tcx> Metadata<'a, 'tcx> for &'a MetadataBlob

source§

impl<'a, 'tcx> Metadata<'a, 'tcx> for CrateMetadataRef<'a>