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

Defines the Identifiable trait for identity-based comparisons.

This module provides the Identifiable trait, which enables types to support identity comparison using the is and is not operators. Identity comparison checks if two values refer to the same object, distinct from equality comparison which checks if two values have the same content.

Traits

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