pub trait EncodeTypeDef {
// Required method
fn encode_type_def(buf: &mut Vec<u8>);
}Expand description
Trait for types that can encode their type definition into the binary protocol. This is used to send type information to JavaScript for callback arguments.
Required Methods§
Sourcefn encode_type_def(buf: &mut Vec<u8>)
fn encode_type_def(buf: &mut Vec<u8>)
Encode this type’s definition into the buffer. For primitives, this is just the TypeTag byte. For callbacks, this includes param count, param types, and return 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.