Rust · Trait
Drop
Drop lets a type run custom cleanup when its value is no longer needed. Rust calls drop automatically, and std::mem::drop can trigger cleanup early.
Last updated
- Since
- 1.0.0
Syntax
pub trait Drop { fn drop(&mut self); }In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
std::mem::dropCopystd::ops::Dropdrop glue