Skip to main content
Log in

Mojo struct

Origin

@register_passable(trivial) struct Origin[is_mutable: Bool]

This represents a origin reference for a memory value.

Parameters

  • is_mutable (Bool): Whether the origin is mutable.

Aliases

  • cast_from = _lit_mut_cast[is_mutable, ?]: Cast an existing Origin to be of the specified mutability.

Implemented traits

AnyType, Copyable, Movable, UnknownDestructibility

Methods

__init__

__init__(out self, mlir_origin: Origin[is_mutable.value])

Initialize an Origin from a raw MLIR !lit.origin value.

Args:

  • mlir_origin (Origin[is_mutable.value]): The raw MLIR origin value.