Skip to main content

pin_drop

Macro pin_drop 

Source
macro_rules! pin_drop {
    ( $var:ident $(,)? ) => { ... };
}
Expand description

Drops, in-place, the value: T to which the given $var: Pin<&mut T> points to.

It does so in a manner of which drop-check will be aware of, avoiding a borrow-checking error which the more naive $var.set(<dummy>) would run into.

Note that this API is only available for $var: Pin<&mut _> bindings which stem from a droppable_pin! invocation.