Skip to main content
Log in

Mojo trait

CollectionElementNew

A temporary explicitly-copyable alternative to CollectionElement.

This trait will eventually replace CollectionElement.

Implemented traits

AnyType, ExplicitlyCopyable, Movable, UnknownDestructibility

Methods

__moveinit__

__moveinit__(out self: _Self, owned existing: _Self, /)

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

Args:

  • existing (_Self): The value to move.

copy

copy(self: _Self) -> _Self

Explicitly construct a copy of self.

Returns:

A copy of this value.