Expand description
Procedural macros for bstack_raii.
Three entry points:
bstack_block— attribute macro. Turns an ergonomic struct into a parallel#[repr(C, packed)]on-disk representation plus generated accessors,BStackDrop,BStackCast, and (for(rc, weak))BStackWeakableimpls.bstack_move— function-like macro. Destructures aBStackOwned<X>, transferring ownership of every field out as a tuple of typed handles.bstack_cast— function-like macro. Direction-inferring typed/untyped handle conversion.
Macros§
- bstack_
cast bstack_cast!(expr as Target)— type-checked handle conversion. The target is given explicitly (a function-like macro can’t read aletannotation) and selects the direction:- bstack_
move bstack_move!(handle)/bstack_move!(owned, allocator)— transfer every field out of a block, freeing only the parent shell.
Attribute Macros§
- bstack_
block #[bstack_block]— generate the on-disk layout and typed handle machinery.- bstack_
class #[bstack_class]— a#[bstack_block]that also persists RTTI.- bstack_
enum #[bstack_enum]— a tagged-union block.