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§
const USE_EVALUATED_EXPR: bool = false
Required Associated Types§
type Src: Layout<OpaqueLayout = TypeLayout>
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>
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.