Struct Tables

Source
pub struct Tables<'tcx, B: Bridge> {
    pub def_ids: IndexMap<DefId, B::DefId>,
    pub alloc_ids: IndexMap<AllocId, B::AllocId>,
    pub spans: IndexMap<Span, B::Span>,
    pub types: IndexMap<Ty<'tcx>, B::Ty>,
    pub instances: IndexMap<Instance<'tcx>, B::InstanceDef>,
    pub ty_consts: IndexMap<Const<'tcx>, B::TyConstId>,
    pub mir_consts: IndexMap<Const<'tcx>, B::MirConstId>,
    pub layouts: IndexMap<Layout<'tcx>, B::Layout>,
}

Fields§

§def_ids: IndexMap<DefId, B::DefId>§alloc_ids: IndexMap<AllocId, B::AllocId>§spans: IndexMap<Span, B::Span>§types: IndexMap<Ty<'tcx>, B::Ty>§instances: IndexMap<Instance<'tcx>, B::InstanceDef>§ty_consts: IndexMap<Const<'tcx>, B::TyConstId>§mir_consts: IndexMap<Const<'tcx>, B::MirConstId>§layouts: IndexMap<Layout<'tcx>, B::Layout>

Implementations§

Source§

impl<'tcx, B: Bridge> Tables<'tcx, B>

Source

pub fn intern_ty(&mut self, ty: Ty<'tcx>) -> B::Ty

Source

pub fn intern_ty_const(&mut self, ct: Const<'tcx>) -> B::TyConstId

Source

pub fn intern_mir_const(&mut self, constant: Const<'tcx>) -> B::MirConstId

Source

pub fn create_def_id(&mut self, did: DefId) -> B::DefId

Source

pub fn create_alloc_id(&mut self, aid: AllocId) -> B::AllocId

Source

pub fn create_span(&mut self, span: Span) -> B::Span

Source

pub fn instance_def(&mut self, instance: Instance<'tcx>) -> B::InstanceDef

Source

pub fn layout_id(&mut self, layout: Layout<'tcx>) -> B::Layout

Source

pub fn crate_item(&mut self, did: DefId) -> B::CrateItem

Source

pub fn adt_def(&mut self, did: DefId) -> B::AdtDef

Source

pub fn foreign_module_def(&mut self, did: DefId) -> B::ForeignModuleDef

Source

pub fn foreign_def(&mut self, did: DefId) -> B::ForeignDef

Source

pub fn fn_def(&mut self, did: DefId) -> B::FnDef

Source

pub fn closure_def(&mut self, did: DefId) -> B::ClosureDef

Source

pub fn coroutine_def(&mut self, did: DefId) -> B::CoroutineDef

Source

pub fn coroutine_closure_def(&mut self, did: DefId) -> B::CoroutineClosureDef

Source

pub fn alias_def(&mut self, did: DefId) -> B::AliasDef

Source

pub fn param_def(&mut self, did: DefId) -> B::ParamDef

Source

pub fn br_named_def(&mut self, did: DefId) -> B::BrNamedDef

Source

pub fn trait_def(&mut self, did: DefId) -> B::TraitDef

Source

pub fn generic_def(&mut self, did: DefId) -> B::GenericDef

Source

pub fn const_def(&mut self, did: DefId) -> B::ConstDef

Source

pub fn impl_def(&mut self, did: DefId) -> B::ImplDef

Source

pub fn region_def(&mut self, did: DefId) -> B::RegionDef

Source

pub fn coroutine_witness_def(&mut self, did: DefId) -> B::CoroutineWitnessDef

Source

pub fn assoc_def(&mut self, did: DefId) -> B::AssocDef

Source

pub fn opaque_def(&mut self, did: DefId) -> B::OpaqueDef

Source

pub fn prov(&mut self, aid: AllocId) -> B::Prov

Source

pub fn static_def(&mut self, did: DefId) -> B::StaticDef

Trait Implementations§

Source§

impl<'tcx, B: Bridge> Default for Tables<'tcx, B>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'tcx, B: Bridge> Index<<B as Bridge>::DefId> for Tables<'tcx, B>

Source§

type Output = DefId

The returned type after indexing.
Source§

fn index(&self, index: B::DefId) -> &Self::Output

Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations§

§

impl<'tcx, B> DynSend for Tables<'tcx, B>
where <B as Bridge>::DefId: DynSend, <B as Bridge>::AllocId: DynSend, <B as Bridge>::Span: DynSend, <B as Bridge>::Ty: DynSend, <B as Bridge>::InstanceDef: DynSend, <B as Bridge>::TyConstId: DynSend, <B as Bridge>::MirConstId: DynSend, <B as Bridge>::Layout: DynSend,

§

impl<'tcx, B> DynSync for Tables<'tcx, B>
where <B as Bridge>::DefId: DynSync, <B as Bridge>::AllocId: DynSync, <B as Bridge>::Span: DynSync, <B as Bridge>::Ty: DynSync, <B as Bridge>::InstanceDef: DynSync, <B as Bridge>::TyConstId: DynSync, <B as Bridge>::MirConstId: DynSync, <B as Bridge>::Layout: DynSync,

§

impl<'tcx, B> Freeze for Tables<'tcx, B>

§

impl<'tcx, B> !RefUnwindSafe for Tables<'tcx, B>

§

impl<'tcx, B> Send for Tables<'tcx, B>
where <B as Bridge>::DefId: Send, <B as Bridge>::AllocId: Send, <B as Bridge>::Span: Send, <B as Bridge>::Ty: Send, <B as Bridge>::InstanceDef: Send, <B as Bridge>::TyConstId: Send, <B as Bridge>::MirConstId: Send, <B as Bridge>::Layout: Send,

§

impl<'tcx, B> Sync for Tables<'tcx, B>
where <B as Bridge>::DefId: Sync, <B as Bridge>::AllocId: Sync, <B as Bridge>::Span: Sync, <B as Bridge>::Ty: Sync, <B as Bridge>::InstanceDef: Sync, <B as Bridge>::TyConstId: Sync, <B as Bridge>::MirConstId: Sync, <B as Bridge>::Layout: Sync,

§

impl<'tcx, B> Unpin for Tables<'tcx, B>
where <B as Bridge>::DefId: Unpin, <B as Bridge>::AllocId: Unpin, <B as Bridge>::Span: Unpin, <B as Bridge>::Ty: Unpin, <B as Bridge>::InstanceDef: Unpin, <B as Bridge>::TyConstId: Unpin, <B as Bridge>::MirConstId: Unpin, <B as Bridge>::Layout: Unpin,

§

impl<'tcx, B> !UnwindSafe for Tables<'tcx, B>

Blanket Implementations§

Source§

impl<T> Aligned for T

Source§

const ALIGN: Alignment

Alignment of Self.
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, R> CollectAndApply<T, R> for T

Source§

fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to f(&iter.collect::<Vec<_>>()).

Source§

type Output = R

Source§

impl<T> Filterable for T

Source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<P> IntoQueryParam<P> for P

Source§

impl<T> MaybeResult<T> for T

Source§

type Error = !

Source§

fn from(_: Result<T, <T as MaybeResult<T>>::Error>) -> T

Source§

fn to_result(self) -> Result<T, <T as MaybeResult<T>>::Error>

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<I, T, U> Upcast<I, U> for T
where U: UpcastFrom<I, T>,

Source§

fn upcast(self, interner: I) -> U

Source§

impl<I, T> UpcastFrom<I, T> for T

Source§

fn upcast_from(from: T, _tcx: I) -> T

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<Tcx, T> Value<Tcx> for T
where Tcx: DepContext,

Source§

default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 448 bytes