-
As in subject, why use See for instance documentation examples for According to this discussion, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
I personally like to explicitly declare it public since it is the main entrypoint of an application and, therefore, being called externally. The examples that don't use it are most likely contributions by other users. |
Beta Was this translation helpful? Give feedback.
-
I see... Just to give my 2 cents on this, IMHO in Rust it is good practice to declare public only the very bare minimum that needs to be accessed externally. As an example, by design even if you declare a |
Beta Was this translation helpful? Give feedback.
-
OK never mind, my question was for me to understand why some |
Beta Was this translation helpful? Give feedback.
I personally like to explicitly declare it public since it is the main entrypoint of an application and, therefore, being called externally. The examples that don't use it are most likely contributions by other users.