Metadata in rustc_metadata::rmeta::decoder - Rust
Description: API documentation for the Rust `Metadata` trait in crate `rustc_metadata`.

Skip to main content

## Metadata

# Trait Metadata

Source

    pub(super) trait Metadata<'a>: Copy {
        type Context: BlobDecoder + LazyDecoder;

        // Required methods
        fn blob(self) -> &'a MetadataBlob;
        fn decoder(self, pos: usize) -> Self::Context;
    }

## Required Associated Types§

Source

#### type Context: BlobDecoder + LazyDecoder

## Required Methods§

Source

#### fn blob(self) -> &'a MetadataBlob

Source

#### fn decoder(self, pos: usize) -> Self::Context

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

## Implementations on Foreign Types§

Source§

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

Source§

#### type Context = MetadataDecodeContext<'a, 'tcx>

Source§

#### fn blob(self) -> &'a MetadataBlob

Source§

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

## Implementors§

Source§

### impl<'a> Metadata<'a> for &'a MetadataBlob

Source§

#### type Context = BlobDecodeContext<'a>