ToAnalysedType

Trait ToAnalysedType 

Source
pub trait ToAnalysedType {
    // Required method
    fn to_analysed_type(
        &self,
        resolve: &Resolve,
        resource_map: &impl GetResourceId,
    ) -> Result<AnalysedType, String>;
}
Expand description

ToAnalysedType converts a Type or TypeDef from a wit_parser::Resolve.

ToAnalysedType is intended to be used for helping with writing tests where AnalysedType have to be constructed in the test. For simpler values and types this is usually not a problem, but creating more complex nested or variant types manually can be convoluted.

Note that resources and handles are not implemented.

Required Methods§

Source

fn to_analysed_type( &self, resolve: &Resolve, resource_map: &impl GetResourceId, ) -> Result<AnalysedType, String>

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.

Implementations on Foreign Types§

Source§

impl ToAnalysedType for Type

Source§

fn to_analysed_type( &self, resolve: &Resolve, resource_map: &impl GetResourceId, ) -> Result<AnalysedType, String>

Source§

impl ToAnalysedType for TypeDef

Source§

fn to_analysed_type( &self, resolve: &Resolve, resource_map: &impl GetResourceId, ) -> Result<AnalysedType, String>

Implementors§