Skip to main content

serializable

Attribute Macro serializable 

Source
#[serializable]
Expand description

Derive bincode::Encode + bincode::Decode and inject seal / open methods.

Available when the serialization feature is enabled. Re-exported as toolkit_zero::serialization::serializable.

Applies to structs and enums. Named struct fields annotated with #[serializable(key = "literal")] additionally receive seal_<field> / open_<field> helpers with the key baked in. Keys are moved in and wrapped in Zeroizing<String>, wiping memory on drop.

Full documentation, expansion details, and examples are in the crate-level #[serializable] section.