Skip to main content

defer_drop_mut

Macro defer_drop_mut 

Source
macro_rules! defer_drop_mut {
    ($value:ident, $ctx:ident) => { ... };
}
Available on crate features code and embedded-python only.
Expand description

Like [defer_drop!], but rebinds $value as &mut V via [DropGuard::as_parts_mut].

Use this when the value needs to be mutated in place — for example, advancing an iterator with for_next(), or swapping values during a min/max comparison.