Mojo module
int
Implements the Int class.
These are Mojo built-ins, so you don't need to import them.
Structs
-
Int
: This type represents an integer value.
Traits
-
ImplicitlyIntable
: TheImplicitlyIntable
trait describes a type that can be converted to an Int implicitly. -
Indexer
: TheIndexer
trait is used for types that can index into a collection or pointer. The type returned is the underlying __mlir_type.index, enabling types likeUInt
to not have to be converted to anInt
first. This type is implicitly convertable to anInt
, so can be used anywhere anInt
can e.g. for comparisons. -
Intable
: TheIntable
trait describes a type that can be converted to an Int. -
IntableRaising
: TheIntableRaising
trait describes a type can be converted to an Int, but the conversion might raise an error.
Functions
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!