Improved docs (allman syntax)
This commit is contained in:
@@ -42,13 +42,9 @@ unsafe i32 dangerous()
|
||||
}
|
||||
```
|
||||
|
||||
Function syntax: `[pub] [void | <type>] <name>[<generics>](<params>) [override] { <body> }`
|
||||
|
||||
Functions use **Allman brace style** (opening brace on the next line).
|
||||
|
||||
### Self Parameter
|
||||
|
||||
Methods can take `self`, `mut self`, `&self`, `&mut self` additionally with lifetimes:
|
||||
Methods can take `self`, `mut self`, `&self`, `&mut self`, and `&'a self` / `&'a mut self` with lifetimes:
|
||||
|
||||
```mist
|
||||
pub void set_value(&mut self, i32 v)
|
||||
|
||||
Reference in New Issue
Block a user