Trait core::ops::InPlace
[−]
[src]
pub trait InPlace<Data: ?Sized>: Place<Data> { type Owner; unsafe fn finalize(self) -> Self::Owner; }
Specialization of Place
`Placetrait supporting
in (PLACE) EXPR`.
Associated Types
type Owner
Owner
`Owneris the type of the end value of
in (PLACE) EXPR`
Note that when in (PLACE) EXPR
is solely used for
side-effecting an existing data-structure,
e.g. Vec::emplace_back
, then Owner
`Ownerneed not carry any information at all (e.g. it can be the unit type
()` in that
case).
Required Methods
unsafe fn finalize(self) -> Self::Owner
Converts self into the final value, shifting
deallocation/cleanup responsibilities (if any remain), over to
the returned instance of Owner
`Owner` and forgetting self.