Trait rustc::middle::cstore::MetadataLoader
[−]
[src]
pub trait MetadataLoader { fn get_rlib_metadata(
&self,
target: &Target,
filename: &Path
) -> Result<ErasedBoxRef<[u8]>, String>; fn get_dylib_metadata(
&self,
target: &Target,
filename: &Path
) -> Result<ErasedBoxRef<[u8]>, String>; }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
The backend's way to give the crate store access to the metadata in a library. Note that it returns the raw metadata bytes stored in the library file, whether it is compressed, uncompressed, some weird mix, etc. rmeta files are backend independent and not handled here.
At the time of this writing, there is only one backend and one way to store metadata in library -- this trait just serves to decouple rustc_metadata from the archive reader, which depends on LLVM.
Required Methods
fn get_rlib_metadata(
&self,
target: &Target,
filename: &Path
) -> Result<ErasedBoxRef<[u8]>, String>
&self,
target: &Target,
filename: &Path
) -> Result<ErasedBoxRef<[u8]>, String>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn get_dylib_metadata(
&self,
target: &Target,
filename: &Path
) -> Result<ErasedBoxRef<[u8]>, String>
&self,
target: &Target,
filename: &Path
) -> Result<ErasedBoxRef<[u8]>, String>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?