Structs & classes
Data and lifecycle have different roles.
Data structs
The accepted design distinguishes aggregate data structs from classes with lifecycle behavior. Struct data composition carries constrained, predictable copy, move, and default behavior.
Lifecycle classes
Classes remain native inline values; the keyword does not imply a managed heap object. Construction and destruction follow explicit lifecycle contracts, and allocating an object remains a separate operation.
Copy and move
Copy and move capabilities are type-defined and may be generated, controlled, or rejected under the lifecycle rules. A move does not imply that every class resets to a default value. The source standard-library declarations show concrete accepted ownership patterns.
Public surface
Use pub to expose declarations and members. Public APIs define the lifetime, mutation, and invalidation guarantees callers can rely on.
Readiness
Object-model details have evolved during development. Consult the selected version's API signatures and examples rather than treating older single-struct design notes as current language contracts.