Struct rustc_metadata::index_builder::IndexBuilder [−][src]
pub struct IndexBuilder<'a, 'b: 'a, 'tcx: 'b> {
items: Index,
pub ecx: &'a mut EncodeContext<'b, 'tcx>,
}🔬 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?
Builder that can encode new items, adding them into the index. Item encoding cannot be nested.
Fields
items: Index
🔬 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?
ecx: &'a mut EncodeContext<'b, 'tcx>
🔬 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?
Methods
impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx>[src]
impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx>pub fn new(ecx: &'a mut EncodeContext<'b, 'tcx>) -> Self[src]
pub fn new(ecx: &'a mut EncodeContext<'b, 'tcx>) -> Self🔬 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?
pub fn record<'x, DATA>(
&'x mut self,
id: DefId,
op: fn(_: &mut IsolatedEncoder<'x, 'b, 'tcx>, _: DATA) -> Entry<'tcx>,
data: DATA
) where
DATA: DepGraphRead, [src]
pub fn record<'x, DATA>(
&'x mut self,
id: DefId,
op: fn(_: &mut IsolatedEncoder<'x, 'b, 'tcx>, _: DATA) -> Entry<'tcx>,
data: DATA
) where
DATA: DepGraphRead, 🔬 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?
Emit the data for a def-id to the metadata. The function to
emit the data is op, and it will be given data as
arguments. This record function will call op to generate
the Entry (which may point to other encoded information)
and will then record the Lazy<Entry> for use in the index.
In addition, it will setup a dep-graph task to track what data
op accesses to generate the metadata, which is later used by
incremental compilation to compute a hash for the metadata and
track changes.
The reason that op is a function pointer, and not a closure,
is that we want to be able to completely track all data it has
access to, so that we can be sure that DATA: DepGraphRead
holds, and that it is therefore not gaining "secret" access to
bits of HIR or other state that would not be trackd by the
content system.
pub fn into_items(self) -> Index[src]
pub fn into_items(self) -> Index🔬 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?
impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx>[src]
impl<'a, 'b, 'tcx> IndexBuilder<'a, 'b, 'tcx>fn encode_fields(&mut self, adt_def_id: DefId)[src]
fn encode_fields(&mut self, adt_def_id: DefId)🔬 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 encode_info_for_generics(&mut self, generics: &Generics)[src]
fn encode_info_for_generics(&mut self, generics: &Generics)🔬 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 encode_info_for_ty(&mut self, ty: &Ty)[src]
fn encode_info_for_ty(&mut self, ty: &Ty)🔬 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 encode_info_for_expr(&mut self, expr: &Expr)[src]
fn encode_info_for_expr(&mut self, expr: &Expr)🔬 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 encode_addl_info_for_item(&mut self, item: &Item)[src]
fn encode_addl_info_for_item(&mut self, item: &Item)🔬 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?
In some cases, along with the item itself, we also encode some sub-items. Usually we want some info from the item so it's easier to do that here then to wait until we would encounter normally in the visitor walk.
Methods from Deref<Target = EncodeContext<'b, 'tcx>>
fn emit_node<F: FnOnce(&mut Self, usize) -> R, R>(&mut self, f: F) -> R[src]
fn emit_node<F: FnOnce(&mut Self, usize) -> R, R>(&mut self, f: F) -> R🔬 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 emit_lazy_distance(
&mut self,
position: usize,
min_size: usize
) -> Result<(), Self::Error>[src]
fn emit_lazy_distance(
&mut self,
position: usize,
min_size: usize
) -> Result<(), Self::Error>🔬 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?
pub fn lazy<T: Encodable>(&mut self, value: &T) -> Lazy<T>[src]
pub fn lazy<T: Encodable>(&mut self, value: &T) -> Lazy<T>🔬 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?
pub fn lazy_seq<I, T>(&mut self, iter: I) -> LazySeq<T> where
I: IntoIterator<Item = T>,
T: Encodable, [src]
pub fn lazy_seq<I, T>(&mut self, iter: I) -> LazySeq<T> where
I: IntoIterator<Item = T>,
T: Encodable, 🔬 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?
pub fn lazy_seq_ref<'b, I, T>(&mut self, iter: I) -> LazySeq<T> where
I: IntoIterator<Item = &'b T>,
T: 'b + Encodable, [src]
pub fn lazy_seq_ref<'b, I, T>(&mut self, iter: I) -> LazySeq<T> where
I: IntoIterator<Item = &'b T>,
T: 'b + Encodable, 🔬 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?
pub fn tracked<'x, DATA, R>(
&'x mut self,
op: fn(_: &mut IsolatedEncoder<'x, 'a, 'tcx>, _: DATA) -> R,
data: DATA
) -> R[src]
pub fn tracked<'x, DATA, R>(
&'x mut self,
op: fn(_: &mut IsolatedEncoder<'x, 'a, 'tcx>, _: DATA) -> R,
data: DATA
) -> R🔬 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 encode_info_for_items(&mut self) -> Index[src]
fn encode_info_for_items(&mut self) -> Index🔬 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 encode_def_path_table(&mut self) -> Lazy<DefPathTable>[src]
fn encode_def_path_table(&mut self) -> Lazy<DefPathTable>🔬 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 encode_codemap(&mut self) -> LazySeq<FileMap>[src]
fn encode_codemap(&mut self) -> LazySeq<FileMap>🔬 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 encode_crate_root(&mut self) -> Lazy<CrateRoot>[src]
fn encode_crate_root(&mut self) -> Lazy<CrateRoot>🔬 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?
Trait Implementations
impl<'a, 'b, 'tcx> Deref for IndexBuilder<'a, 'b, 'tcx>[src]
impl<'a, 'b, 'tcx> Deref for IndexBuilder<'a, 'b, 'tcx>type Target = EncodeContext<'b, 'tcx>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
fn deref(&self) -> &Self::TargetDereferences the value.
impl<'a, 'b, 'tcx> DerefMut for IndexBuilder<'a, 'b, 'tcx>[src]
impl<'a, 'b, 'tcx> DerefMut for IndexBuilder<'a, 'b, 'tcx>Auto Trait Implementations
impl<'a, 'b, 'tcx> !Send for IndexBuilder<'a, 'b, 'tcx>
impl<'a, 'b, 'tcx> !Send for IndexBuilder<'a, 'b, 'tcx>impl<'a, 'b, 'tcx> !Sync for IndexBuilder<'a, 'b, 'tcx>
impl<'a, 'b, 'tcx> !Sync for IndexBuilder<'a, 'b, 'tcx>