A struct holds data; an impl block attaches behavior. This is where the self parameter — and the ownership rules you already know — show up in method form.
The impl block
You define methods inside impl TypeName { ... }. A method's first parameter is a form of self, and which form you choose says exactly what the method does with the instance: borrow it, mutate it, or consume it.
The three selfs
&self borrows the instance to read it — the default for most methods. &mut self borrows it to modify it in place. Plain self consumes the instance (takes ownership), used when a method transforms a value into something else and the original shouldn't survive. The borrowing rules you learned apply directly: &self is an immutable borrow, &mut self a mutable one.
&self = 'I'll read.' &mut self = 'I'll change you.' self = 'I'll consume you.' A reader sees the method signature and knows immediately what it does to the receiver — no guessing.Associated functions
A function in an impl block with no self is an associated function, called with ::. The universal example is a constructor: by convention you write fn new(...) -> Self and call it Point::new(1, 2). Self (capital S) is shorthand for the type the impl is on.