pub struct NcsInstruction {
pub opcode: NcsOpcode,
pub auxcode: NcsAuxCode,
pub extra: Vec<u8>,
}Expand description
One decoded NCS instruction.
Fields§
§opcode: NcsOpcodeOperation code.
auxcode: NcsAuxCodeAuxiliary code.
extra: Vec<u8>Encoded instruction payload after opcode and auxcode.
Implementations§
Source§impl NcsInstruction
impl NcsInstruction
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the full encoded byte length of this instruction.
Source§impl NcsInstruction
impl NcsInstruction
Sourcepub fn canonical_name(&self, internal: bool) -> String
pub fn canonical_name(&self, internal: bool) -> String
Returns the upstream nwasm instruction name.
Sourcepub fn extra_string(
&self,
max_string_length: usize,
) -> Result<String, NcsAsmError>
pub fn extra_string( &self, max_string_length: usize, ) -> Result<String, NcsAsmError>
Renders the decoded operand payload using upstream nwasm formatting
rules.
§Errors
Returns NcsAsmError if formatting the operand fails.
Trait Implementations§
Source§impl Clone for NcsInstruction
impl Clone for NcsInstruction
Source§fn clone(&self) -> NcsInstruction
fn clone(&self) -> NcsInstruction
Returns a duplicate 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 NcsInstruction
impl Debug for NcsInstruction
Source§impl Hash for NcsInstruction
impl Hash for NcsInstruction
Source§impl PartialEq for NcsInstruction
impl PartialEq for NcsInstruction
impl Eq for NcsInstruction
impl StructuralPartialEq for NcsInstruction
Auto Trait Implementations§
impl Freeze for NcsInstruction
impl RefUnwindSafe for NcsInstruction
impl Send for NcsInstruction
impl Sync for NcsInstruction
impl Unpin for NcsInstruction
impl UnsafeUnpin for NcsInstruction
impl UnwindSafe for NcsInstruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.