Function pin

Source
pub fn pin<T: Notify>(data: T) -> (Pin<Tx<T>>, Pin<Rx<T>>)
Expand description

Allocates a pointer holding data and returns a pair of pinned references.

The rules are the same as new except that the memory is pinned in place and cannot be moved again, unless T implements Unpin.