Struct rustc::ty::trait_def::TraitDef [] [src]

pub struct TraitDef {
    pub def_id: DefId,
    pub unsafety: Unsafety,
    pub paren_sugar: bool,
    pub specialization_graph: RefCell<Graph>,
    pub flags: Cell<TraitFlags>,
    pub def_path_hash: u64,
    // some fields omitted
}
🔬 This is a nightly-only experimental API. (rustc_private)

A trait's definition with type information.

Fields

🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)
🔬 This is a nightly-only experimental API. (rustc_private)

If true, then this trait had the #[rustc_paren_sugar] attribute, indicating that it should be used with Foo() sugar. This is a temporary thing -- eventually any trait will be usable with the sugar (or without it).

🔬 This is a nightly-only experimental API. (rustc_private)

The specialization order for impls of this trait.

🔬 This is a nightly-only experimental API. (rustc_private)

Various flags

🔬 This is a nightly-only experimental API. (rustc_private)

The ICH of this trait's DefPath, cached here so it doesn't have to be recomputed all the time.

Methods

impl<'a, 'gcx, 'tcx> TraitDef
[src]

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

Records a trait-to-implementation mapping for a crate-local impl.

🔬 This is a nightly-only experimental API. (rustc_private)

Records a trait-to-implementation mapping.

🔬 This is a nightly-only experimental API. (rustc_private)

Records a trait-to-implementation mapping for a non-local impl.

The parent_impl is the immediately-less-specialized impl, or the trait's def ID if the impl is not a specialization -- information that should be pulled from the metadata.

🔬 This is a nightly-only experimental API. (rustc_private)

Adds a local impl into the specialization graph, returning an error with overlap information if the impl overlaps but does not specialize an existing impl.

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

Whether the impl set and specialization graphs are complete.

🔬 This is a nightly-only experimental API. (rustc_private)

🔬 This is a nightly-only experimental API. (rustc_private)

Iterate over every impl that could possibly match the self-type self_ty.

Trait Implementations

impl Debug for TraitDef
[src]

Formats the value using the given formatter.