Expand description
boxpin adds a .pinned() suffix for values that should become
Pin<Box<T>>.
The method is intentionally tiny and does exactly what it looks like:
it forwards to Box::pin.
§Examples
Pin an async block with suffix syntax:
use boxpin::BoxPinExt;
let value = async { 41_u8 }.pinned().await;
assert_eq!(value, 41);Pin a regular value:
use boxpin::BoxPinExt;
let pinned = String::from("boxpin").pinned();
assert_eq!(&*pinned, "boxpin");