A DEV Community post by @nyaomaru (nyaomaru) walks beginners through Rust's ownership model using a cat-and-crab metaphor, keeping the examples small and the tone light. The original article is available at https://dev.to/_yourbrainbuffer_/cozy-bytes-rustwho-owns-the-cat-13ch.
Ownership and moves
The post opens with Rust's three ownership rules: every value has an owner, there can only be one owner at a time, and the value is dropped when the owner goes out of scope. It illustrates this with a String bound to one variable and then assigned to another. After the assignment, using the original variable produces a compile error, because ownership has moved to the new binding. The author frames this as the first variable no longer owning the cat.
Borrowing with references
To use a value without taking ownership, the article introduces references. With a shared reference (&), both the original variable and the reference can be printed, since the original still owns the value and the reference only borrows it. The author describes this as petting someone's cat without taking it home.
Mutable references
The post then shows a mutable reference (&mut), which allows modifying the borrowed String through methods like push_str. A short example demonstrates appending text through the mutable reference and then printing the original variable to show the change. The author notes that a shared reference does not permit this kind of modification.
The borrow checker's rules
The final section contrasts multiple shared references, which are allowed, with multiple mutable references, which are not. Two simultaneous &mut borrows to the same value fail to compile. The article summarizes the rule as: many readers can borrow a value at once, but only one mutable borrow can exist, and it cannot coexist with other active borrows. The borrow checker is presented as the mechanism enforcing these constraints.
Summary
The post closes with a short recap mapping each concept to the cat metaphor: ownership, moves, shared references, mutable references, and the borrow checker. It emphasizes learning Rust gradually rather than all at once. The examples are intentionally minimal, with no architecture diagrams, and the source includes runnable code snippets for each concept.