Pin_mut in futures - Rust


Pins a value on the stack.

Question: does it pin the value on the stack to a location on the stack, or does it take a value that is on the stack, and pins it (somewhere else, i.e. the heap) ?

You can just look at its source to see what it does. It moves the value into an owned variable, and takes a mutable reference to it, shadowing the variable.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.