summaryrefslogtreecommitdiff
path: root/Static class functions are called associated functions.md
blob: f6421b0285387eefb8e4c963f0eec20e575db053 (plain)
1
2
3
An `associated function` is what in other OOP languages like PHP would be considered a static function on a class. So it's callable directly from on type rather than an object. An example in Rust is `String::new()`.

It is indicated by the double colon `::`.