Built-in encoders and decoders for common types
Provides type-safe encoding/decoding for ETS operations.
Note: For complex types (like custom types), users should provide
their own encoder/decoder functions. Common patterns:
- Tuples: Store structured data that ETS can pattern match
- JSON strings: Store as strings, parse in your code
- Custom serialization: Any format that converts to/from Dynamic
pub fn bool_decoder() -> decode.Decoder(Bool)
Decode a boolean from Dynamic
pub fn bool_encoder(b: Bool) -> dynamic.Dynamic
Encode a boolean to Dynamic
pub fn float_decoder() -> decode.Decoder(Float)
Decode a float from Dynamic
pub fn float_encoder(f: Float) -> dynamic.Dynamic
Encode a float to Dynamic
pub fn int_decoder() -> decode.Decoder(Int)
Decode an integer from Dynamic
pub fn string_decoder() -> decode.Decoder(String)
Decode a string from Dynamic
pub fn string_encoder(s: String) -> dynamic.Dynamic
Encode a string to Dynamic