Skip to main content

Mojo trait

Enum

Implemented traits

AnyType, UnknownDestructibility

Aliases

__del__is_trivial

comptime __del__is_trivial

A flag (often compiler generated) to indicate whether the implementation of __del__ is trivial.

The implementation of __del__ is considered to be trivial if:

  • The struct has a compiler-generated trivial destructor and all its fields have a trivial __del__ method.

In practice, it means that the __del__ can be considered as no-op.

Required methods

value

value(self: _Self) -> Int

Returns:

Int

Provided methods

__eq__

__eq__(self: _Self, other: _Self) -> Bool

Returns:

Bool

__ne__

__ne__(self: _Self, other: _Self) -> Bool

Returns:

Bool

__is__

__is__(self: _Self, other: _Self) -> Bool

Returns:

Bool

__isnot__

__isnot__(self: _Self, other: _Self) -> Bool

Returns:

Bool

Was this page helpful?