Trait rusttyc::types::Constructable[][src]

pub trait Constructable: ContextSensitiveVariant {
    type Type: Clone + Debug;
    fn construct(
        &self,
        children: &[Self::Type]
    ) -> Result<Self::Type, Self::Err>; }

A type implementing this trait can potentially be transformed into a concrete representation. This transformation can fail.

Associated Types

type Type: Clone + Debug[src]

The result type of the attempted construction.

Loading content...

Required methods

fn construct(&self, children: &[Self::Type]) -> Result<Self::Type, Self::Err>[src]

Attempts to transform self into an more concrete Self::Type. Returns a ContextSensitiveVariant::Err if the transformation fails. This error will be wrapped into a crate::TcErr to enrich it with contextual information.

Loading content...

Implementors

Loading content...