IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /docs/manual/basics.md). For the complete Mojo documentation index, see llms.txt.
Skip to main content
Version: Nightly
For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).

Identifiable

The Identifiable trait denotes a type with an identity which can be compared with other instances of itself.

Implemented traits

AnyType

Required methods

__is__

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

Define whether self has the same identity as rhs.

Args:

  • rhs (_Self): The right hand side of the comparison.

Returns:

Bool: True if self is rhs.

Provided methods

__isnot__

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

Define whether self has a different identity than rhs.

Args:

  • rhs (_Self): The right hand side of the comparison.

Returns:

Bool: True if self is not rhs.