Skip to main content

Mojo trait

CollectionElementNew

A temporary explicitly-copyable alternative to CollectionElement.

This trait will eventually replace CollectionElement.

Implemented traits

AnyType, ExplicitlyCopyable, Movable

Methods

__init__

__init__(inout self: T, /, *, other: T)

Explicitly construct a deep copy of the provided value.

Args:

  • other (T): The value to copy.

__moveinit__

__moveinit__(inout self: T, owned existing: T, /)

Create a new instance of the value by moving the value of another.

Args:

  • existing (T): The value to move.