Mojo struct
Attr
A generic object's attributes are set on construction, after which the attributes can be read and modified, but no attributes may be removed or added.
Fields
- key (
StringLiteral
): The name of the attribute. - value (
object
): The value of the attribute.
Implemented traits
AnyType
Methods
__init__
__init__(out self, key: StringLiteral, owned value: object)
Initializes the attribute with a key and value.
Args:
- key (
StringLiteral
): The string literal key. - value (
object
): The object value of the attribute.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!