IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: 1.0
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

value

Defines core value traits.

These are Mojo built-ins, so you don't need to import them.

Traits

  • Copyable: The Copyable trait denotes a type whose value can be explicitly copied.
  • Defaultable: The Defaultable trait describes a type with a default constructor.
  • ImplicitlyCopyable: A marker trait to permit compiler to insert implicit calls to the copy constructor in order to make a copy of the object when needed.
  • Movable: The Movable trait denotes a type whose value can be moved.
  • RegisterPassable: A marker trait to denote the type to be register passable.
  • TrivialRegisterPassable: A marker trait to denote the type to be register passable trivial.

Functions

  • materialize: Explicitly materialize a compile-time parameter into a run-time value.