[][src]Struct chalk::program::Program

pub struct Program {
    pub(crate) type_ids: BTreeMap<Identifier, TypeKindId>,
    pub(crate) type_kinds: BTreeMap<TypeKindId, TypeKind>,
    pub(crate) struct_data: BTreeMap<StructId, Arc<StructDatum>>,
    pub(crate) impl_data: BTreeMap<ImplId, Arc<ImplDatum>>,
    pub(crate) trait_data: BTreeMap<TraitId, Arc<TraitDatum>>,
    pub(crate) associated_ty_data: BTreeMap<TypeId, Arc<AssociatedTyDatum>>,
    pub(crate) custom_clauses: Vec<ProgramClause>,
}

Fields

type_ids: BTreeMap<Identifier, TypeKindId>

From type-name to item-id. Used during lowering only.

type_kinds: BTreeMap<TypeKindId, TypeKind>

For each struct/trait:

struct_data: BTreeMap<StructId, Arc<StructDatum>>

For each struct:

impl_data: BTreeMap<ImplId, Arc<ImplDatum>>

For each impl:

trait_data: BTreeMap<TraitId, Arc<TraitDatum>>

For each trait:

associated_ty_data: BTreeMap<TypeId, Arc<AssociatedTyDatum>>

For each associated ty:

custom_clauses: Vec<ProgramClause>

For each user-specified clause

Methods

impl Program[src]

pub(crate) fn split_projection<'p>(
    &self,
    projection: &'p ProjectionTy
) -> (Arc<AssociatedTyDatum>, &'p [Parameter], &'p [Parameter])
[src]

Given a projection of an associated type, split the type parameters into those that come from the trait and those that come from the associated type itself. So e.g. if you have (Iterator::Item)<F>, this would return ([F], []), since Iterator::Item is not generic and hence doesn't have any type parameters itself.

Used primarily for debugging output.

pub(crate) fn local_impl_ids(&self) -> Vec<ImplId>[src]

Returns the ids for all impls declared in this crate.

Trait Implementations

impl LowerGoal<Program> for Goal[src]

impl Eq for Program[src]

impl PartialEq<Program> for Program[src]

impl Clone for Program[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Program[src]

impl DebugContext for Program[src]

Auto Trait Implementations

impl Send for Program

impl Sync for Program

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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

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

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> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]