Convert

Trait Convert 

Source
pub trait Convert {
    type Src: Layout<OpaqueLayout = TypeLayout>;

    const USE_EVALUATED_EXPR: bool = false;

    // Required methods
    fn convert(&self, ty: Type<Self::Src>) -> Result<Type<TypeLayout>>;
    fn extract_type(
        &self,
        ty: &Type,
    ) -> Result<<Self::Src as Layout>::TypeLayout>;
    fn extract_field(
        &self,
        field: &RecordField,
        pos: usize,
    ) -> Result<<Self::Src as Layout>::FieldLayout>;
}

Provided Associated Constants§

Required Associated Types§

Source

type Src: Layout<OpaqueLayout = TypeLayout>

Required Methods§

Source

fn convert(&self, ty: Type<Self::Src>) -> Result<Type<TypeLayout>>

Source

fn extract_type(&self, ty: &Type) -> Result<<Self::Src as Layout>::TypeLayout>

Source

fn extract_field( &self, field: &RecordField, pos: usize, ) -> Result<<Self::Src as Layout>::FieldLayout>

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§