rust - What's the difference between `self` and `Self`? -


i haven't come across self in documentation, in source code. documentation uses self.

self when used first method argument, shorthand self: self – there &self equals self: &self , &mut self equals self: &mut self.

self in method arguments syntactic sugar receiving type of method (i.e. type impl method in. allows generic types without repetition.


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -