Need Assistance?

support@tutorialshub.in

Structs & Methods

Associated Functions (Constructors)

ADVERTISEMENT
Rust Free Lesson
5 min read
ADVERTISEMENT

Functions inside impl that do not take self are called Associated Functions (similar to static methods). By convention, Rust uses new(...) as a constructor returning Self.

ADVERTISEMENT
Hi, I'm Tuby! Here to help you