From 931eb0894e7cd3717f1218f0eb06382b11734c13 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Sun, 3 Aug 2025 22:29:47 +0200 Subject: vault backup: 2025-08-03 22:29:47 --- Static class functions are called associated functions.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Static class functions are called associated functions.md (limited to 'Static class functions are called associated functions.md') 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 -- cgit v1.2.3