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§
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>
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.