Crate async_safe_defer

Source
Expand description

This library provides two implementations of RAII-style deferred execution: one using dynamic allocation (the default) and one that avoids allocation entirely (no_alloc), with a fixed-capacity array of deferred function pointers.

Macros§

async_scope
Macro that creates an async scope to automatically await all async defers.
defer
Macro for creating a synchronous defer guard.

Structs§

AsyncScope
An async-aware scope guard for storing and running deferred async closures.

Functions§

defer
RAII-style guard for executing a closure at the end of a scope.