Struct Methods
Functions defined inside a struct are called member methods, which can access fields of the current instance through this.
Methods are called using dot notation on an instance, such as c1.area(). Methods can access all fields of the instance and can also call other methods. Static methods are decorated with static and called through the type name.
The Circle in the code on the right defines four methods: area, circumference, describe, and isLargerThan, demonstrating different method usages. isLargerThan accepts another Circle parameter for comparison.
Regular methods cannot modify the value of var fields. If you need to modify fields in a method, use mut func (explained on the next page).
Try adding a diameter() method that returns the diameter (2.0 * radius) and call it in main.