Enum sway_ir::instruction::FuelVmInstruction
source · pub enum FuelVmInstruction {
GetStorageKey,
Gtf {
index: Value,
tx_field_id: u64,
},
Log {
log_val: Value,
log_ty: Type,
log_id: Value,
},
ReadRegister(Register),
Revert(Value),
Smo {
recipient_and_message: Value,
message_size: Value,
output_index: Value,
coins: Value,
},
StateClear {
key: Value,
number_of_slots: Value,
},
StateLoadQuadWord {
load_val: Value,
key: Value,
number_of_slots: Value,
},
StateLoadWord(Value),
StateStoreQuadWord {
stored_val: Value,
key: Value,
number_of_slots: Value,
},
StateStoreWord {
stored_val: Value,
key: Value,
},
}
Variants§
GetStorageKey
Generate a unique integer value
Gtf
Log
Logs a value along with an identifier.
ReadRegister(Register)
Reads a special register in the VM.
Revert(Value)
Revert VM execution.
Smo
- Sends a message to an output via the
smo
FuelVM instruction. The first operand must be a struct with the first field being aB256
representing the recipient. The rest of the struct is the message data being sent. - Assumes the existence of an
OutputMessage
atoutput_index
message_size
,output_index
, andcoins
must be of typeU64
.
StateClear
Clears number_of_slots
storage slots (b256
each) starting at key key
.
StateLoadQuadWord
Reads number_of_slots
slots (b256
each) from storage starting at key key
and stores
them in memory starting at address load_val
.
StateLoadWord(Value)
Reads and returns single word from a storage slot.
StateStoreQuadWord
Stores number_of_slots
slots (b256
each) starting at address stored_val
in memory into
storage starting at key key
. key
must be a b256
.
StateStoreWord
Writes a single word to a storage slot. key
must be a b256
and the type of stored_val
must be a u64
.
Trait Implementations§
source§impl Clone for FuelVmInstruction
impl Clone for FuelVmInstruction
source§fn clone(&self) -> FuelVmInstruction
fn clone(&self) -> FuelVmInstruction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FuelVmInstruction
impl Debug for FuelVmInstruction
source§impl DebugWithContext for FuelVmInstruction
impl DebugWithContext for FuelVmInstruction
fn fmt_with_context<'a, 'c>( &'a self, formatter: &mut Formatter<'_>, context: &'c Context ) -> Result
fn with_context<'a, 'c>( &'a self, context: &'c Context ) -> WithContext<'a, 'c, Self>
Auto Trait Implementations§
impl RefUnwindSafe for FuelVmInstruction
impl Send for FuelVmInstruction
impl Sync for FuelVmInstruction
impl Unpin for FuelVmInstruction
impl UnwindSafe for FuelVmInstruction
Blanket Implementations§
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.