Skip to main content

module

value

Defines core value traits.

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

Traits

  • Movable: The Movable trait denotes a type whose value can be moved.
  • Copyable: The Copyable trait denotes a type whose value can be copied.
  • ExplicitlyCopyable: The ExplicitlyCopyable trait denotes a type whose value can be copied explicitly.
  • Defaultable: The Defaultable trait describes a type with a default constructor.
  • CollectionElement: The CollectionElement trait denotes a trait composition of the Copyable and Movable traits.
  • StringableCollectionElement: The StringableCollectionElement trait denotes a trait composition of the CollectionElement and Stringable traits.
  • ComparableCollectionElement: This trait is a temporary solution to enable comparison of collection elements as utilized in the index and count methods of a list. This approach will be revised with the introduction of conditional trait conformances.
  • RepresentableCollectionElement: The RepresentableCollectionElement trait denotes a trait composition of the CollectionElement and Representable traits.
  • BoolableCollectionElement: The BoolableCollectionElement trait denotes a trait composition of the Boolable and CollectionElement traits.
  • BoolableKeyElement: The BoolableKeyElement trait denotes a trait composition of the Boolable and KeyElement traits.