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

renaming files in a directory using python or R -

html - outline-style different in chrome compared to firefox and internet explorer -

ruby on rails - Carrierwave Timeout -