Function show_notes::e004::demonstrate_methods

source ·
pub fn demonstrate_methods()
Expand description

Shows how to use both struct and instance methods.

Note that struct methods are called with the :: syntax, which is the same as the module syntax! We’ll come back to this soon. Note as well that the . syntax used for instance methods corresponds to the use of self (in whatever form) in