pub trait WitType: Sized {
type Layout: Layout;
type Dependencies: RegisterWitTypes;
const SIZE: u32;
// Required methods
fn wit_type_name() -> Cow<'static, str>;
fn wit_type_declaration() -> Cow<'static, str>;
}
Expand description
A type that is representable by fundamental WIT types.
Required Associated Constants§
Required Associated Types§
Sourcetype Dependencies: RegisterWitTypes
type Dependencies: RegisterWitTypes
Other WitType
s that this type depends on.
Required Methods§
Sourcefn wit_type_name() -> Cow<'static, str>
fn wit_type_name() -> Cow<'static, str>
Generates the WIT type name for this type.
Sourcefn wit_type_declaration() -> Cow<'static, str>
fn wit_type_declaration() -> Cow<'static, str>
Generates the WIT type declaration for this 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.