Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The static methods are mainly used to constructor and return an instance of the struct. By convention the default constructor is called new(), but we can define others.

In the following example we define a Window struct that represents an application window:

The new() constructor takes as arguments all values required for fields, and returns a Window instance denoted by the Self type:

Here is an example of usage of the constructor:

(10, 20, 200, 80)

see solution