Mojo struct
Origin
@register_passable(trivial)
struct Origin[mut: Bool, //, _mlir_origin: LITOrigin[mut._mlir_value]]
This represents a origin reference for a memory value.
Parameters
- mut (
Bool): Whether the origin is mutable. - _mlir_origin (
LITOrigin): The raw MLIR origin value.
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable,
RegisterPassable,
TrivialRegisterPassable
comptime members
__copyinit__is_trivial
comptime __copyinit__is_trivial = True
__del__is_trivial
comptime __del__is_trivial = True
__moveinit__is_trivial
comptime __moveinit__is_trivial = True
Methods
__init__
__init__() -> Self
Construct an Origin.
@implicit
__init__(v: Origin[mut=v.mut]) -> ImmutOrigin
Implicitly convert an origin to an immutable one.
Args:
- v (
Origin): The origin to convert.
Returns:
ImmutOrigin
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!