Bug 1870642 - Fix Collection deleted snackbar that overlaps the toolbar r=android...
[gecko.git] / third_party / rust / uniffi_bindgen / src / bindings / kotlin / templates / README.md
blob0e770cb8294e8e82e69e90f250a7444f4a6c817c
1 # Rules for the Kotlin template code
3 ## Naming
5 Private variables, classes, functions, etc. should be prefixed with `uniffi`, `Uniffi`, or `UNIFFI`.
6 This avoids naming collisions with user-defined items.
7 Users will not get name collisions as long as they don't use "uniffi", which is reserved for us.
9 In particular, make sure to use the `uniffi` prefix for any variable names in generated functions.
10 If you name a variable something like `result` the code will probably work initially.
11 Then it will break later on when a user decides to define a function with a parameter named `result`.
13 Note: this doesn't apply to items that we want to expose, for example users may want to catch `InternalException` so doesn't get the `Uniffi` prefix.