Last active
January 17, 2022 21:37
-
-
Save FermiDirak/5e122e1e1b93eafe0373ab33fc7a2913 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct MyStruct { /* ... */ } | |
impl MyStruct { | |
pub fn instance_method(&self) { /* ... */ }; | |
} | |
// usage | |
let my_struct = MyStruct { /* ... */ } | |
my_struct.instance_method(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment