Trait rusttyc::types::Constructable [−][src]
pub trait Constructable: ContextSensitiveVariant {
type Type: Clone + Debug;
fn construct(
&self,
children: &[Self::Type]
) -> Result<Self::Type, <Self as ContextSensitiveVariant>::Err>;
}
Expand description
A type implementing this trait can potentially be transformed into a concrete representation. This transformation can fail.
Associated Types
Required methods
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.