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

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -