Mojo struct
Mode
struct Mode
Defines a Benchmark Mode to distinguish between test runs and actual benchmarks.
Fields
- value (Int): Represents the mode type.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
Movable,
UnknownDestructibility
Aliases
__copyinit__is_trivial
alias __copyinit__is_trivial = Int.__copyinit__is_trivial
__del__is_trivial
alias __del__is_trivial = Int.__del__is_trivial
__moveinit__is_trivial
alias __moveinit__is_trivial = Int.__moveinit__is_trivial
Benchmark
alias Benchmark = Mode(0)
Test
alias Test = Mode(1)
Methods
__eq__
__eq__(self, other: Self) -> Bool
Check if its Benchmark mode or test mode.
Args:
- other (Self): The mode to be compared against.
Returns:
Bool: If its a test mode or benchmark mode.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
