Mojo trait
StringableIdentifiable
The StringableIdentifiable trait denotes a trait composition of the Stringable
and Identifiable
traits.
This is useful to have as a named entity since Mojo does not
currently support anonymous trait compositions to constrain
on Stringable & Identifiable
in the parameter.
Implemented traitsβ
AnyType
,
Identifiable
,
Stringable
Methodsβ
__is__
β
__is__(self: T, rhs: T) -> Bool
Define whether self
has the same identity as rhs
.
Args:
- βrhs (
T
): The right hand side of the comparison.
Returns:
True if self
is rhs
.
__isnot__
β
__isnot__(self: T, rhs: T) -> Bool
Define whether self
has a different identity than rhs
.
Args:
- βrhs (
T
): The right hand side of the comparison.
Returns:
True if self
is not rhs
.
__str__
β
__str__(self: T) -> String
Get the string representation of the type.
Returns:
The string representation of the type.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
If you'd like to share more information, please report an issue on GitHub
π What went wrong?