[−][src]Struct rustc_middle::traits::specialization_graph::Graph

pub struct Graph {
    pub parent: DefIdMap<DefId>,
    pub children: DefIdMap<Children>,
    pub has_errored: bool,
}

A per-trait graph of impls in specialization order. At the moment, this graph forms a tree rooted with the trait itself, with all other nodes representing impls, and parent-child relationships representing specializations.

The graph provides two key services:

Fields

parent: DefIdMap<DefId>

All impls have a parent; the "root" impls have as their parent the def_id of the trait.

children: DefIdMap<Children>

The "root" impls are found by looking up the trait's def_id.

has_errored: bool

Whether an error was emitted while constructing the graph.

Implementations

impl Graph[src]

pub fn new() -> Graph[src]

pub fn parent(&self, child: DefId) -> DefId[src]

The parent of a given impl, which is the DefId of the trait when the impl is a "specialization root".

Trait Implementations

impl<'tcx, __D: TyDecoder<'tcx>> Decodable<__D> for Graph[src]

impl<'tcx, __E: TyEncoder<'tcx>> Encodable<__E> for Graph[src]

impl<'__ctx> HashStable<StableHashingContext<'__ctx>> for Graph[src]

Auto Trait Implementations

impl RefUnwindSafe for Graph

impl Send for Graph

impl Sync for Graph

impl Unpin for Graph

impl UnwindSafe for Graph

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]