Bridge in rustc_public_bridge - Rust
Description: A trait defining types that are used to emulate rustc_public components, which is really useful when programming in rustc_public-agnostic settings.

Skip to main content

## Bridge

# Trait Bridge

Source

    pub trait Bridge: Sized {
    Show 31 associated items    type DefId: Cacheable;
        type AllocId: Cacheable;
        type Span: Cacheable;
        type Ty: Cacheable;
        type InstanceDef: Cacheable;
        type TyConstId: Cacheable;
        type MirConstId: Cacheable;
        type Layout: Cacheable;
        type Error: Error;
        type CrateItem: CrateItem<Self>;
        type AdtDef: AdtDef<Self>;
        type ForeignModuleDef: ForeignModuleDef<Self>;
        type ForeignDef: ForeignDef<Self>;
        type FnDef: FnDef<Self>;
        type ClosureDef: ClosureDef<Self>;
        type CoroutineDef: CoroutineDef<Self>;
        type CoroutineClosureDef: CoroutineClosureDef<Self>;
        type AliasDef: AliasDef<Self>;
        type ParamDef: ParamDef<Self>;
        type BrNamedDef: BrNamedDef<Self>;
        type TraitDef: TraitDef<Self>;
        type GenericDef: GenericDef<Self>;
        type ConstDef: ConstDef<Self>;
        type ImplDef: ImplDef<Self>;
        type RegionDef: RegionDef<Self>;
        type CoroutineWitnessDef: CoroutineWitnessDef<Self>;
        type AssocDef: AssocDef<Self>;
        type OpaqueDef: OpaqueDef<Self>;
        type Prov: Prov<Self>;
        type StaticDef: StaticDef<Self>;
        type Allocation: Allocation<Self>;
    }

Expand description

A trait defining types that are used to emulate rustc_public components, which is really useful when programming in rustc_public-agnostic settings.

## Required Associated Types§

Source

#### type DefId: Cacheable

Source

#### type AllocId: Cacheable

Source

#### type Span: Cacheable

Source

#### type Ty: Cacheable

Source

#### type InstanceDef: Cacheable

Source

#### type TyConstId: Cacheable

Source

#### type MirConstId: Cacheable

Source

#### type Layout: Cacheable

Source

#### type Error: Error

Source

#### type CrateItem: CrateItem<Self>

Source

#### type AdtDef: AdtDef<Self>

Source

#### type ForeignModuleDef: ForeignModuleDef<Self>

Source

#### type ForeignDef: ForeignDef<Self>

Source

#### type FnDef: FnDef<Self>

Source

#### type ClosureDef: ClosureDef<Self>

Source

#### type CoroutineDef: CoroutineDef<Self>

Source

#### type CoroutineClosureDef: CoroutineClosureDef<Self>

Source

#### type AliasDef: AliasDef<Self>

Source

#### type ParamDef: ParamDef<Self>

Source

#### type BrNamedDef: BrNamedDef<Self>

Source

#### type TraitDef: TraitDef<Self>

Source

#### type GenericDef: GenericDef<Self>

Source

#### type ConstDef: ConstDef<Self>

Source

#### type ImplDef: ImplDef<Self>

Source

#### type RegionDef: RegionDef<Self>

Source

#### type CoroutineWitnessDef: CoroutineWitnessDef<Self>

Source

#### type AssocDef: AssocDef<Self>

Source

#### type OpaqueDef: OpaqueDef<Self>

Source

#### type Prov: Prov<Self>

Source

#### type StaticDef: StaticDef<Self>

Source

#### type Allocation: Allocation<Self>

## Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

## Implementors§