summaryrefslogtreecommitdiff
path: root/Static class functions are called associated functions.md
diff options
context:
space:
mode:
authorJasper Ras <jras@hostnet.nl>2025-08-03 22:29:47 +0200
committerJasper Ras <jras@hostnet.nl>2025-08-03 22:29:47 +0200
commit931eb0894e7cd3717f1218f0eb06382b11734c13 (patch)
treeb6ad9b0d98a8f26e496c91ad3f24d1c855b654df /Static class functions are called associated functions.md
parentaf98004d2cf437603f47f4224110a80d76d0d7de (diff)
vault backup: 2025-08-03 22:29:47
Diffstat (limited to 'Static class functions are called associated functions.md')
-rw-r--r--Static class functions are called associated functions.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/Static class functions are called associated functions.md b/Static class functions are called associated functions.md
new file mode 100644
index 0000000..dc4c195
--- /dev/null
+++ b/Static class functions are called associated functions.md
@@ -0,0 +1,6 @@
+[[Rust]]
+
+---
+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 `::`. \ No newline at end of file