Trait rusttyc::types::Constructable [−][src]
pub trait Constructable: Variant { type Type: Clone + Debug; fn construct(
&self,
children: &[Self::Type]
) -> Result<Self::Type, Self::Err>; }
Expand description
A type implementing this trait can potentially be transformed into a concrete representation. This transformation can fail.
Associated Types
Loading content...Required methods
fn construct(&self, children: &[Self::Type]) -> Result<Self::Type, Self::Err>
[src]
Expand description
Attempts to transform self
into an more concrete Self::Type
.
Returns a Variant::Err if the transformation fails. This error will be wrapped into a crate::TcErr to enrich it with contextual information.