Static Method of Structs
This lesson teaches you how to declare static methods of structs.
We'll cover the following
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.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy