std::ops::InPlace

Trait std::ops::InPlace

pub trait InPlace<Data>: Place<Data> where    Data: ?Sized, {
    type Owner;
    unsafe fn finalize(self) -> Self::Owner;
}
???? This is a nightly-only experimental API. (placement_new_protocol #27779)

Specialization of Place trait supporting PLACE <- EXPR.

Associated Types

???? This is a nightly-only experimental API. (placement_new_protocol #27779)

Owner is the type of the end value of PLACE <- EXPR

Note that when PLACE <- EXPR is solely used for side-effecting an existing data-structure, e.g. Vec::emplace_back, then Owner need not carry any information at all (e.g. it can be the unit type () in that case).

Required Methods

???? This is a nightly-only experimental API. (placement_new_protocol #27779)

Converts self into the final value, shifting deallocation/cleanup responsibilities (if any remain), over to the returned instance of Owner and forgetting self.

Implementors

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ops/trait.InPlace.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部