Expand description
Core encoding and decoding traits for the binary protocol.
This module provides traits for serializing and deserializing Rust types to/from the binary IPC protocol.
Structs§
- Borrowed
First Arg - Marker type for closures that borrow the first argument.
- Callback
Key - Wrapper type that encodes a callback registration key with Callback type info.
This tells JS to create a RustFunction wrapper when decoding the value.
The type parameter F should be
dyn FnMut(...) -> Rto capture the callback signature.
Enums§
- TypeTag
- Type tags for the binary type definition protocol. Used to encode type information that JavaScript can parse to create TypeClass instances.
Traits§
- Batchable
Result - Trait for return types that can be used in batched JS calls. Determines how the type behaves during batching.
- Binary
Decode - Trait for decoding values from the binary protocol. Each type specifies how to deserialize itself.
- Binary
Encode - Trait for encoding Rust values into the binary protocol. Each type specifies how to serialize itself.
- Clone
ForEncode - Marker trait for types that can be cheaply cloned for encoding.
- Encode
Type Def - 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.
- Into
Closure - Trait for converting a closure into a Closure wrapper.
This trait is used instead of
Fromto allow blanket implementations for all closure types without conflicting with otherFromimpls. Output is a generic parameter (not associated type) to allow implementing the trait multiple times for the same type with different outputs.