cairo_lang_sierra::extensions::types

Trait GenericTypeArgGenericType

Source
pub trait GenericTypeArgGenericType: Default {
    const ID: GenericTypeId;

    // Required method
    fn calc_info(
        &self,
        context: &dyn TypeSpecializationContext,
        long_id: ConcreteTypeLongId,
        wrapped_info: TypeInfo,
    ) -> Result<TypeInfo, SpecializationError>;
}
Expand description

Trait for describing a generic type with a single type arg.

Required Associated Constants§

Required Methods§

Source

fn calc_info( &self, context: &dyn TypeSpecializationContext, long_id: ConcreteTypeLongId, wrapped_info: TypeInfo, ) -> Result<TypeInfo, SpecializationError>

Returns the type info of the wrapping type.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§