Skip to main content



Implements the Int class.

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


  • Int: This type represents an integer value.


  • Indexer: This trait denotes a type that can be used to index a container that handles integral index values.
  • Intable: The Intable trait describes a type that can be converted to an Int.
  • IntableRaising: The IntableRaising trait describes a type can be converted to an Int, but the conversion might raise an error.


  • index: Returns the value of __index__ for the given value.
  • int: Get the Int representation of the value.