X Tutup
Skip to content

Latest commit

 

History

History
 
 

README.md

Method Definition and Usage Example

In the Method and associated function.rs file, There are examples of defining and using methods and associated functions for structs. All the codes in the list below has been taught in the Rust free tutorial in persian No: 11.

Basic Concpets

  • Struct creation
  • Struct instantiation
  • Method creation
  • Method with Ownership moving
  • Printing an instance of a struct
  • Associated Function
  • Struct creation shorthand

Other concepts those are directly related to the structs and has been taught in the Rust free tutorial in perisan No: 12.

Advanced Concepts

  • Tuple Like Structs (TupleLikeStruct.rs)
  • Unit Like Structs (UnitLikeStructs.rs)
  • Value Inheritance (ValueInheritance.rs and ValueInheritanceWithClone.rs)
  • Infinite Recursive Type Problem (RecursiveTypeInfiniteSize.rs)
X Tutup