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
Post a Comment