Skip to main content

impl_on_disk_struct_wrapped_primitive

Macro impl_on_disk_struct_wrapped_primitive 

Source
macro_rules! impl_on_disk_struct_wrapped_primitive {
    ($type:ty, $raw_type:ty, $wrap:expr, $unwrap:expr) => { ... };
}
Expand description

Implement OnDiskStruct for a type wrapping a primitive type.

First argument: The wrapping type, e.g. AtomicU16; second argument: The inner primitive type (e.g. std::sync::atomic::AtomicPrimitive::Storage, which just is not yet stable); third argument: The wrapping function (for loading); fourth argument: The unwrapping function (for storing).