Skip to main content

Op

Enum Op 

Source
pub enum Op {
Show 140 variants LoadConst { dst: Register, idx: u16, }, LoadUndefined { dst: Register, }, LoadNull { dst: Register, }, LoadBool { dst: Register, value: bool, }, LoadInt { dst: Register, value: i32, }, Move { dst: Register, src: Register, }, Add { dst: Register, left: Register, right: Register, }, Sub { dst: Register, left: Register, right: Register, }, Mul { dst: Register, left: Register, right: Register, }, Div { dst: Register, left: Register, right: Register, }, Mod { dst: Register, left: Register, right: Register, }, Exp { dst: Register, left: Register, right: Register, }, Eq { dst: Register, left: Register, right: Register, }, NotEq { dst: Register, left: Register, right: Register, }, StrictEq { dst: Register, left: Register, right: Register, }, StrictNotEq { dst: Register, left: Register, right: Register, }, Lt { dst: Register, left: Register, right: Register, }, LtEq { dst: Register, left: Register, right: Register, }, Gt { dst: Register, left: Register, right: Register, }, GtEq { dst: Register, left: Register, right: Register, }, BitAnd { dst: Register, left: Register, right: Register, }, BitOr { dst: Register, left: Register, right: Register, }, BitXor { dst: Register, left: Register, right: Register, }, LShift { dst: Register, left: Register, right: Register, }, RShift { dst: Register, left: Register, right: Register, }, URShift { dst: Register, left: Register, right: Register, }, In { dst: Register, left: Register, right: Register, }, Instanceof { dst: Register, left: Register, right: Register, }, Neg { dst: Register, src: Register, }, Plus { dst: Register, src: Register, }, Not { dst: Register, src: Register, }, BitNot { dst: Register, src: Register, }, Typeof { dst: Register, src: Register, }, Void { dst: Register, src: Register, }, Jump { target: JumpTarget, }, JumpIfTrue { cond: Register, target: JumpTarget, }, JumpIfFalse { cond: Register, target: JumpTarget, }, JumpIfNullish { cond: Register, target: JumpTarget, }, JumpIfNotNullish { cond: Register, target: JumpTarget, }, Break { target: JumpTarget, try_depth: u8, }, Continue { target: JumpTarget, try_depth: u8, }, GetVar { dst: Register, name: u16, }, TryGetVar { dst: Register, name: u16, }, SetVar { name: u16, src: Register, }, DeclareVar { name: u16, init: Register, mutable: bool, }, DeclareVarHoisted { name: u16, init: Register, }, GetGlobal { dst: Register, name: u16, }, SetGlobal { name: u16, src: Register, }, CreateObject { dst: Register, }, CreateArray { dst: Register, start: Register, count: u16, }, ArrayPush { arr: Register, value: Register, }, GetProperty { dst: Register, obj: Register, key: Register, }, GetPropertyConst { dst: Register, obj: Register, key: u16, }, SetProperty { obj: Register, key: Register, value: Register, }, SetPropertyConst { obj: Register, key: u16, value: Register, }, DeleteProperty { dst: Register, obj: Register, key: Register, }, DeletePropertyConst { dst: Register, obj: Register, key: u16, }, DefineProperty { obj: Register, key: Register, value: Register, flags: u8, }, Call { dst: Register, callee: Register, this: Register, args_start: Register, argc: u8, }, CallSpread { dst: Register, callee: Register, this: Register, args_start: Register, argc: u8, }, DirectEval { dst: Register, arg: Register, }, CallMethod { dst: Register, obj: Register, method: u16, args_start: Register, argc: u8, }, TailCall { callee: Register, this: Register, args_start: Register, argc: u8, }, TailCallSpread { callee: Register, this: Register, args_start: Register, argc: u8, }, TailCallAwait { dst: Register, callee: Register, this: Register, args_start: Register, argc: u8, }, TailCallAwaitSpread { dst: Register, callee: Register, this: Register, args_start: Register, argc: u8, }, Construct { dst: Register, callee: Register, args_start: Register, argc: u8, }, ConstructSpread { dst: Register, callee: Register, args_start: Register, argc: u8, }, Return { value: Register, }, ReturnUndefined, CreateClosure { dst: Register, chunk_idx: u16, }, CreateArrow { dst: Register, chunk_idx: u16, }, CreateGenerator { dst: Register, chunk_idx: u16, }, CreateAsync { dst: Register, chunk_idx: u16, }, CreateAsyncGenerator { dst: Register, chunk_idx: u16, }, Throw { value: Register, }, PushTry { catch_target: JumpTarget, finally_target: JumpTarget, }, PopTry, FinallyEnd, GetException { dst: Register, }, PushIterTry { iterator: Register, catch_target: JumpTarget, }, PopIterTry, Rethrow, Await { dst: Register, promise: Register, }, Yield { dst: Register, value: Register, }, YieldStar { dst: Register, iterable: Register, }, PushScope, PopScope, GetIterator { dst: Register, obj: Register, }, GetKeysIterator { dst: Register, obj: Register, }, GetAsyncIterator { dst: Register, obj: Register, }, IteratorNext { dst: Register, iterator: Register, }, IteratorDone { result: Register, target: JumpTarget, }, IteratorValue { dst: Register, result: Register, }, IteratorClose { iterator: Register, }, CreateClass { dst: Register, constructor: Register, super_class: Register, }, DefineMethod { class: Register, name: u16, method: Register, is_static: bool, }, DefineAccessor { class: Register, name: u16, getter: Register, setter: Register, is_static: bool, }, DefineMethodComputed { class: Register, key: Register, method: Register, is_static: bool, }, DefineAccessorComputed { class: Register, key: Register, getter: Register, setter: Register, is_static: bool, }, SuperCall { dst: Register, args_start: Register, argc: u8, }, SuperCallSpread { dst: Register, args_array: Register, }, SuperGet { dst: Register, key: Register, }, SuperGetConst { dst: Register, key: u16, }, SuperSet { key: Register, value: Register, }, SuperSetConst { key: u16, value: Register, }, ApplyClassDecorator { class: Register, decorator: Register, class_name: u16, initializers: Register, }, RunClassInitializers { class: Register, initializers: Register, }, ApplyMethodDecorator { method: Register, decorator: Register, name: u16, kind: u8, is_static: bool, is_private: bool, }, ApplyParameterDecorator { target: Register, decorator: Register, method_name: u16, param_name: u16, param_index: u8, is_static: bool, }, ApplyFieldDecorator { dst: Register, decorator: Register, name: u16, is_static: bool, is_private: bool, is_accessor: bool, }, StoreFieldInitializer { class: Register, name: u16, initializer: Register, }, GetFieldInitializer { dst: Register, class: Register, name: u16, }, ApplyFieldInitializer { value: Register, initializer: Register, }, DefineAutoAccessor { class: Register, name: u16, init_value: Register, target_dst: Register, is_static: bool, }, StoreAutoAccessor { class: Register, name: u16, accessor_obj: Register, is_static: bool, }, ApplyAutoAccessorDecorator { target: Register, decorator: Register, name: u16, is_static: bool, }, SpreadArray { dst: Register, src: Register, }, CreateRestArray { dst: Register, start_index: u8, }, CreateObjectRest { dst: Register, src: Register, excluded_keys: u16, }, SpreadObject { dst: Register, src: Register, }, TemplateConcat { dst: Register, start: Register, count: u8, }, TaggedTemplate { dst: Register, tag: Register, this: Register, template: u16, exprs_start: Register, exprs_count: u8, }, GetPrivateField { dst: Register, obj: Register, class_brand: u32, field_name: u16, }, SetPrivateField { obj: Register, class_brand: u32, field_name: u16, value: Register, }, DefinePrivateField { obj: Register, class_brand: u32, field_name: u16, value: Register, }, DefinePrivateMethod { class: Register, class_brand: u32, method_name: u16, method: Register, is_static: bool, }, InstallPrivateMethod { class_brand: u32, method_name: u16, }, SetFunctionName { func: Register, name: u16, }, Nop, Halt, Debugger, Pop, Dup { dst: Register, src: Register, }, LoadThis { dst: Register, }, LoadArguments { dst: Register, }, LoadNewTarget { dst: Register, }, ExportBinding { export_name: u16, binding_name: u16, value: Register, }, ExportNamespace { export_name: u16, module_specifier: u16, }, ReExport { export_name: u16, source_module: u16, source_key: u16, },
}
Expand description

Bytecode instruction

Each instruction operates on virtual registers. The register-based design generates fewer instructions than a stack-based VM and has better cache locality.

Op is Copy because all variants contain only primitive types (u8, u16, u32, bool). This allows efficient pass-by-value without heap allocation or reference counting.

Variants§

§

LoadConst

Load constant from pool: r[dst] = constants[idx]

Fields

§idx: u16
§

LoadUndefined

Load undefined: r[dst] = undefined

Fields

§

LoadNull

Load null: r[dst] = null

Fields

§

LoadBool

Load boolean: r[dst] = value

Fields

§value: bool
§

LoadInt

Load integer (small numbers without constant pool): r[dst] = value

Fields

§value: i32
§

Move

Move register: r[dst] = r[src]

Fields

§

Add

Add: r[dst] = r[left] + r[right]

Fields

§right: Register
§

Sub

Subtract: r[dst] = r[left] - r[right]

Fields

§right: Register
§

Mul

Multiply: r[dst] = r[left] * r[right]

Fields

§right: Register
§

Div

Divide: r[dst] = r[left] / r[right]

Fields

§right: Register
§

Mod

Modulo: r[dst] = r[left] % r[right]

Fields

§right: Register
§

Exp

Exponentiation: r[dst] = r[left] ** r[right]

Fields

§right: Register
§

Eq

Loose equality: r[dst] = r[left] == r[right]

Fields

§right: Register
§

NotEq

Loose inequality: r[dst] = r[left] != r[right]

Fields

§right: Register
§

StrictEq

Strict equality: r[dst] = r[left] === r[right]

Fields

§right: Register
§

StrictNotEq

Strict inequality: r[dst] = r[left] !== r[right]

Fields

§right: Register
§

Lt

Less than: r[dst] = r[left] < r[right]

Fields

§right: Register
§

LtEq

Less than or equal: r[dst] = r[left] <= r[right]

Fields

§right: Register
§

Gt

Greater than: r[dst] = r[left] > r[right]

Fields

§right: Register
§

GtEq

Greater than or equal: r[dst] = r[left] >= r[right]

Fields

§right: Register
§

BitAnd

Bitwise AND: r[dst] = r[left] & r[right]

Fields

§right: Register
§

BitOr

Bitwise OR: r[dst] = r[left] | r[right]

Fields

§right: Register
§

BitXor

Bitwise XOR: r[dst] = r[left] ^ r[right]

Fields

§right: Register
§

LShift

Left shift: r[dst] = r[left] << r[right]

Fields

§right: Register
§

RShift

Signed right shift: r[dst] = r[left] >> r[right]

Fields

§right: Register
§

URShift

Unsigned right shift: r[dst] = r[left] >>> r[right]

Fields

§right: Register
§

In

In operator: r[dst] = r[left] in r[right]

Fields

§right: Register
§

Instanceof

Instanceof: r[dst] = r[left] instanceof r[right]

Fields

§right: Register
§

Neg

Negate: r[dst] = -r[src]

Fields

§

Plus

Unary plus: r[dst] = +r[src] (ToNumber)

Fields

§

Not

Logical not: r[dst] = !r[src]

Fields

§

BitNot

Bitwise not: r[dst] = ~r[src]

Fields

§

Typeof

Typeof: r[dst] = typeof r[src]

Fields

§

Void

Void: r[dst] = void r[src] (always undefined)

Fields

§

Jump

Unconditional jump

Fields

§target: JumpTarget
§

JumpIfTrue

Jump if r[cond] is truthy

Fields

§target: JumpTarget
§

JumpIfFalse

Jump if r[cond] is falsy

Fields

§target: JumpTarget
§

JumpIfNullish

Jump if r[cond] is null or undefined (for ??)

Fields

§target: JumpTarget
§

JumpIfNotNullish

Jump if r[cond] is NOT null or undefined (for ?.)

Fields

§target: JumpTarget
§

Break

Break to target (runs finally blocks first) try_depth is the try stack depth at the target loop

Fields

§target: JumpTarget
§try_depth: u8
§

Continue

Continue to target (runs finally blocks first) try_depth is the try stack depth at the target loop

Fields

§target: JumpTarget
§try_depth: u8
§

GetVar

Load variable: r[dst] = env[name]

Fields

§name: u16
§

TryGetVar

Try to load variable, returns undefined if not found: r[dst] = env[name] ?? undefined

Fields

§name: u16
§

SetVar

Store variable: env[name] = r[src]

Fields

§name: u16
§

DeclareVar

Declare variable with let/const: env.define(name, r[init], mutable)

Fields

§name: u16
§mutable: bool
§

DeclareVarHoisted

Declare variable with var (hoisted): env.define_var(name, r[init])

Fields

§name: u16
§

GetGlobal

Get global variable (optimized path for globals)

Fields

§name: u16
§

SetGlobal

Set global variable

Fields

§name: u16
§

CreateObject

Create empty object: r[dst] = {}

Fields

§

CreateArray

Create array from registers: r[dst] = [r[start]..r[start+count]]

Fields

§start: Register
§count: u16
§

ArrayPush

Push element onto array: r[arr].push(r[value])

Fields

§value: Register
§

GetProperty

Get property with computed key: r[dst] = r[obj][r[key]]

Fields

§

GetPropertyConst

Get property with constant key: r[dst] = r[obj].name

Fields

§key: u16
§

SetProperty

Set property with computed key: r[obj][r[key]] = r[value]

Fields

§value: Register
§

SetPropertyConst

Set property with constant key: r[obj].name = r[value]

Fields

§key: u16
§value: Register
§

DeleteProperty

Delete property: r[dst] = delete r[obj][r[key]]

Fields

§

DeletePropertyConst

Delete property with constant key: r[dst] = delete r[obj].name

Fields

§key: u16
§

DefineProperty

Define property with descriptor (for object literals with getters/setters)

Fields

§value: Register
§flags: u8
§

Call

Call function: r[dst] = r[callee].call(r[this], r[args_start..args_start+argc])

Fields

§callee: Register
§args_start: Register
§argc: u8
§

CallSpread

Call with spread arguments (some args may need spreading)

Fields

§callee: Register
§args_start: Register
§argc: u8
§

DirectEval

Direct eval call: r[dst] = eval(r[arg]) This is a special form that preserves the calling scope for direct eval. Unlike regular Call, direct eval has access to the lexical scope.

Fields

§

CallMethod

Call method: r[dst] = r[obj].name(args…) Optimized form that preserves this correctly

Fields

§method: u16
§args_start: Register
§argc: u8
§

TailCall

Tail call: reuse current frame instead of pushing new one Used for tail call optimization when a call is directly returned

Fields

§callee: Register
§args_start: Register
§argc: u8
§

TailCallSpread

Tail call with spread arguments

Fields

§callee: Register
§args_start: Register
§argc: u8
§

TailCallAwait

Async tail call: reuse current frame for return await fn() pattern Used for tail call optimization in async functions The dst register is used when falling back to non-optimized path (native functions)

Fields

§callee: Register
§args_start: Register
§argc: u8
§

TailCallAwaitSpread

Async tail call with spread arguments

Fields

§callee: Register
§args_start: Register
§argc: u8
§

Construct

Construct: r[dst] = new rcallee

Fields

§callee: Register
§args_start: Register
§argc: u8
§

ConstructSpread

Construct with spread arguments (args_start points to an args array)

Fields

§callee: Register
§args_start: Register
§argc: u8
§

Return

Return from function with value

Fields

§value: Register
§

ReturnUndefined

Return undefined from function

§

CreateClosure

Create closure from bytecode chunk: r[dst] = function from chunk[idx]

Fields

§chunk_idx: u16
§

CreateArrow

Create arrow function (captures lexical this)

Fields

§chunk_idx: u16
§

CreateGenerator

Create generator function

Fields

§chunk_idx: u16
§

CreateAsync

Create async function

Fields

§chunk_idx: u16
§

CreateAsyncGenerator

Create async generator function

Fields

§chunk_idx: u16
§

Throw

Throw exception: throw r[value]

Fields

§value: Register
§

PushTry

Push try handler with catch at catch_target If finally_target is 0, there’s no finally block

Fields

§catch_target: JumpTarget
§finally_target: JumpTarget
§

PopTry

Pop try handler (normal completion)

§

FinallyEnd

End of finally block - complete any pending return/throw

§

GetException

Get caught exception value: r[dst] = caught_exception

Fields

§

PushIterTry

Push iterator try handler - like PushTry but calls iterator.return() on exception Used by for-of loops to implement iterator close protocol on throws

Fields

§iterator: Register
§catch_target: JumpTarget
§

PopIterTry

Pop iterator try handler (normal exit, no iterator close needed)

§

Rethrow

Rethrow current exception (in catch block)

§

Await

Await: suspend execution, r[dst] = await r[promise]

Fields

§promise: Register
§

Yield

Yield: suspend generator, r[dst] = yield r[value]

Fields

§value: Register
§

YieldStar

Yield*: delegate to iterable, r[dst] = yield* r[iterable]

Fields

§iterable: Register
§

PushScope

Push new lexical scope

§

PopScope

Pop lexical scope

§

GetIterator

Get iterator: r[dst] = r[obj]Symbol.iterator

Fields

§

GetKeysIterator

Get keys iterator for for-in loops: iterates over own enumerable string keys

Fields

§

GetAsyncIterator

Get async iterator: r[dst] = r[obj]Symbol.asyncIterator

Fields

§

IteratorNext

Iterator next: r[dst] = r[iterator].next()

Fields

§iterator: Register
§

IteratorDone

Check if iterator result is done: jump if r[result].done

Fields

§result: Register
§target: JumpTarget
§

IteratorValue

Get iterator result value: r[dst] = r[result].value

Fields

§result: Register
§

IteratorClose

Close iterator: call r[iterator].return() if it exists Used for early loop exit (break, return, throw) in for-of loops

Fields

§iterator: Register
§

CreateClass

Create class: r[dst] = class with r[constructor] and r[super_class]

Fields

§constructor: Register
§super_class: Register
§

DefineMethod

Define class method on prototype

Fields

§class: Register
§name: u16
§method: Register
§is_static: bool
§

DefineAccessor

Define getter/setter

Fields

§class: Register
§name: u16
§getter: Register
§setter: Register
§is_static: bool
§

DefineMethodComputed

Define class method with computed key

Fields

§class: Register
§method: Register
§is_static: bool
§

DefineAccessorComputed

Define getter/setter with computed key

Fields

§class: Register
§getter: Register
§setter: Register
§is_static: bool
§

SuperCall

Super call: r[dst] = super(args…)

Fields

§args_start: Register
§argc: u8
§

SuperCallSpread

Super call with spread: r[dst] = super(…r[args_array]) args_array should contain an array of arguments

Fields

§args_array: Register
§

SuperGet

Super property get: r[dst] = super[r[key]]

Fields

§

SuperGetConst

Super property get with constant key: r[dst] = super.name

Fields

§key: u16
§

SuperSet

Super property set: super[r[key]] = r[value]

Fields

§value: Register
§

SuperSetConst

Super property set with constant key: super.name = r[value]

Fields

§key: u16
§value: Register
§

ApplyClassDecorator

Apply class decorator: r[class] = decorator(r[class], context) The class_name constant is optional (ConstantIndex::MAX means no name) The initializers register holds an array that addInitializer() pushes callbacks to

Fields

§class: Register
§decorator: Register
§class_name: u16
§initializers: Register
§

RunClassInitializers

Run class decorator initializers: calls each function in r[initializers] with r[class] as this

Fields

§class: Register
§initializers: Register
§

ApplyMethodDecorator

Apply method decorator: r[method] = decorator(r[method], context) context contains { kind: “method”|“getter”|“setter”, name, static, private }

Fields

§method: Register
§decorator: Register
§name: u16
§kind: u8
§is_static: bool
§is_private: bool
§

ApplyParameterDecorator

Apply parameter decorator: decorator(r[target], context) context contains { kind: “parameter”, name, function, index, static } Parameter decorators are called for side effects only (like metadata registration)

Fields

§target: Register
§decorator: Register
§method_name: u16
§param_name: u16
§param_index: u8
§is_static: bool
§

ApplyFieldDecorator

Apply field decorator: r[dst] = decorator(undefined, context) Field decorators receive undefined as first arg, return an initializer transformer For auto-accessors, is_accessor=true and context.kind will be “accessor” instead of “field”

Fields

§decorator: Register
§name: u16
§is_static: bool
§is_private: bool
§is_accessor: bool
§

StoreFieldInitializer

Store field initializer on class: class.field_initializers[name] = r[initializer] This is used to store the result of field decorators on the class

Fields

§class: Register
§name: u16
§initializer: Register
§

GetFieldInitializer

Get field initializer from class: r[dst] = class.field_initializers[name] Used during instance construction to retrieve stored initializers

Fields

§class: Register
§name: u16
§

ApplyFieldInitializer

Apply field initializer: r[value] = rinitializer Transforms the initial value using the decorator’s returned initializer

Fields

§value: Register
§initializer: Register
§

DefineAutoAccessor

Define auto-accessor property: creates getter/setter and defines them on prototype r[target_dst] = { get, set } object for decorator use (or undefined if no decorators) The accessor is defined on the class prototype (or class itself if is_static)

Fields

§class: Register
§name: u16
§init_value: Register
§target_dst: Register
§is_static: bool
§

StoreAutoAccessor

Store auto-accessor (decorated getter/setter) on class Takes the decorated { get, set } object and defines the accessor property

Fields

§class: Register
§name: u16
§accessor_obj: Register
§is_static: bool
§

ApplyAutoAccessorDecorator

Apply auto-accessor decorator: r[target] = decorator(r[target], context) context contains { kind: “accessor”, name, static }

Fields

§target: Register
§decorator: Register
§name: u16
§is_static: bool
§

SpreadArray

Spread array into registers for function calls Copies elements from r[src] into r[dst..dst+actual_count] Returns actual count in a hidden register

Fields

§

CreateRestArray

Create rest array from remaining arguments

Fields

§start_index: u8
§

CreateObjectRest

Create object rest from source object, excluding specified keys excluded_keys is a constant index pointing to a Vec in the constant pool

Fields

§excluded_keys: u16
§

SpreadObject

Spread object properties: copy all enumerable own properties from r[src] to r[dst]

Fields

§

TemplateConcat

Concatenate template parts: r[dst] = r[start..start+count].join()

Fields

§start: Register
§count: u8
§

TaggedTemplate

Tagged template call

Fields

§template: u16
§exprs_start: Register
§exprs_count: u8
§

GetPrivateField

Get private field: r[dst] = r[obj].#name class_brand is a unique id per class definition (for brand checking) field_name is a constant index for the field name (including # prefix)

Fields

§class_brand: u32
§field_name: u16
§

SetPrivateField

Set private field: r[obj].#name = r[value]

Fields

§class_brand: u32
§field_name: u16
§value: Register
§

DefinePrivateField

Define private field on object: r[obj].#name = r[value] Called during instance creation to install private fields

Fields

§class_brand: u32
§field_name: u16
§value: Register
§

DefinePrivateMethod

Define private method on class (stored in constructor for later installation) When constructing instances, these get copied to the instance’s private_fields

Fields

§class: Register
§class_brand: u32
§method_name: u16
§method: Register
§is_static: bool
§

InstallPrivateMethod

Install stored private method on instance during construction Reads method from new.target’s private_methods and installs on this

Fields

§class_brand: u32
§method_name: u16
§

SetFunctionName

Set function name if the value is an anonymous function This implements the SetFunctionName abstract operation from the spec. If r[func] is a function without a name, sets its name to the constant. If it already has a name or is not a function, this is a no-op.

Fields

§name: u16
§

Nop

No operation (used for alignment/patching)

§

Halt

Halt execution (end of program)

§

Debugger

Debugger statement

§

Pop

Pop value from stack (discard expression result)

§

Dup

Duplicate value: r[dst] = r[src] (same as Move but semantically different)

Fields

§

LoadThis

Load this value: r[dst] = this

Fields

§

LoadArguments

Load arguments object: r[dst] = arguments

Fields

§

LoadNewTarget

Load new.target: r[dst] = new.target

Fields

§

ExportBinding

Export a binding: exports[export_name] = { name: binding_name, value: r[value] } Used for export const foo = ... and export { foo }

Fields

§export_name: u16
§binding_name: u16
§value: Register
§

ExportNamespace

Export a namespace re-export: exports[name] = module_namespace Used for export * as ns from "module"

Fields

§export_name: u16
§module_specifier: u16
§

ReExport

Re-export from another module: exports[export_name] = { from: source_module, key: source_key } Used for export { foo } from "./bar"

Fields

§export_name: u16
§source_module: u16
§source_key: u16

Trait Implementations§

Source§

impl Clone for Op

Source§

fn clone(&self) -> Op

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Op

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for Op

Auto Trait Implementations§

§

impl Freeze for Op

§

impl RefUnwindSafe for Op

§

impl Send for Op

§

impl Sync for Op

§

impl Unpin for Op

§

impl UnwindSafe for Op

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.