Glossary coding Term Page
self
Owning method receiver
Core Idea
In Rust methods, self means the method takes ownership of the instance instead of borrowing it.
This differs from &self, which borrows immutably, and &mut self, which borrows mutably. Use self when the method should consume the value, move it elsewhere, or finish by returning a transformed replacement.
Why It Matters Here
Mathbong uses this term when comparing the three Rust method receivers and explaining when ownership transfer is the right choice.