This crate allows one to get ownership of dropped data\ Note: this crate supports no_std
Example ```rust use owneddrop::OwnedDroppable; use owneddrop::DropOwned;
fn do_stuff(owner: OwnerOfVec) { let mut drop = DropOwned::new(owner);
// ...
// `drop` gets dropped here and `drop_owned` gets called.
}
struct OwnerOfVec {
data: Vec
impl OwnedDroppable for OwnerOfVec {
fn dropowned(self) {
// This avoids a clone call one would normally have to do
// if one only had &mut self
instead if self
functionrequiring_ownership(self.data);
}
}
fn functionrequiringownership(data: Vec
```