mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-01-23 22:13:02 +02:00
Link to reference on method receiver types
This commit is contained in:
parent
82a2f4c423
commit
94cd8bb592
@ -14,4 +14,6 @@ are other possible receivers for a method:
|
||||
* No receiver: this becomes a static method on the struct. Typically used to
|
||||
create constructors which are called `new` by convention.
|
||||
|
||||
There are even more types, e.g., `Box<Self>`.
|
||||
Beyond variants on `self`, there are also
|
||||
[special wrapper types](https://doc.rust-lang.org/reference/special-types-and-traits.html)
|
||||
allowed to be receiver types, such as `Box<Self>`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user