Skip to content

Glossary: Software Design Patterns in Rust

Drop

Also written: drop, Drop trait

The trait whose `drop` method Rust runs automatically when a value goes out of scope. It is how Rust does cleanup (RAII).

Where the book teaches it

Related terms

Template method