Function with_global_alloc

Source
pub fn with_global_alloc<T>(f: impl FnOnce() -> T) -> T
Expand description

Run the provided closure with enabling the global bump allocator. This is only intended to be used for mesh_protobuf decode.

Note that if the global allocator was ever used before, this function will panic.