Skip to main content

Mojo function

index

index[T: Indexer](idx: T, /) -> Int

Returns the value of __index__ for the given value.

Parameters:

  • T (Indexer): A type conforming to the Indexer trait.

Args:

  • idx (T): The value.

Returns:

An Int representing the index value.