Structures (records)
Definition and initialization
Constructors
Methods
Fields and properties
Constants
Inheritance
Structure inside the structure
struct
Point
{
x:
i32
,
y:
i32
,
}
let
p1 =
Point
{x:
1
, y:
2
};
println!
(
"p1 is (
{}
,
{}
)"
,
p1.
x
, p1.
y
);