Trait refmove::AnchorExt [−][src]
pub trait AnchorExt: Sized { fn anchor(self) -> StackAnchor<Self> { ... } fn anchor_box(self) -> Self::Anchor
where
Self: Deref,
Self: BorrowInterior<Self::Target>, { ... } }
Provides anchor
and anchor_box
methods.
Provided Methods
fn anchor(self) -> StackAnchor<Self>
Wraps the value by StackAnchor
.
With #![feature(nll)]
enabled you can write .anchor().borrow_move()
to create RefMove
pointing to the stack.
fn anchor_box(self) -> Self::Anchor where
Self: Deref,
Self: BorrowInterior<Self::Target>,
Self: Deref,
Self: BorrowInterior<Self::Target>,
Wraps the value by BoxAnchor
or IdentityAnchor
.
With #![feature(nll)]
enabled you can write .anchor_box().borrow_move()
to create RefMove
pointing to the heap.
Implementors
impl<T> AnchorExt for T