This lesson teaches you how to declare static methods of structs.
What Are Static Methods?
Static methods are the ones that can be invoked without instantiating the struct.
Declare a Static Method
The following illustration explains how to declare a static method within the impl
construct.
Note: If the construct is declared with an
impl
keyword, it must have one or both ...