Modules
Structs
- A V8Slice encapsulates a slice that’s been borrowed from a JavaScript ArrayBuffer object. JavaScript objects can normally be garbage collected, but the existence of a V8Slice inhibits this until it is dropped. It behaves much like an Arc<u8>.
- serde_v8::Value allows passing through
v8::Value
s untouched when de/serializing & allows mixing rust & v8 values in structs, tuples…
Enums
- An untagged enum type that can be any of number, string, bool, bigint, or buffer.
- SerializablePkg exists to provide a fast path for op returns, allowing them to avoid boxing primitives (ints/floats/bool/unit/…)
Traits
- Serializable exists to allow boxing values as “objects” to be serialized later, this is particularly useful for async op-responses. This trait is a more efficient replacement for erased-serde that makes less allocations, since it’s specific to serde_v8 (and thus doesn’t have to have generic outputs, etc…)