pub struct Reference {
pub instruction_index: Option<i32>,
pub instruction_operand_index: Option<i32>,
pub operand_expression_index: Option<i32>,
pub string_table_index: Option<i32>,
}Expand description
Generic reference class used for address comments (deprecated), string references and expression substitutions. It allows referencing from an instruction, operand, expression subtree tuple to a de-duped string in the string table.
Fields§
§instruction_index: Option<i32>Index into the global instruction table.
instruction_operand_index: Option<i32>Index into the operand array local to an instruction.
operand_expression_index: Option<i32>Index into the expression array local to an operand.
string_table_index: Option<i32>Index into the global string table.
Implementations§
Source§impl Reference
impl Reference
Sourcepub fn instruction_index(&self) -> i32
pub fn instruction_index(&self) -> i32
Returns the value of instruction_index, or the default value if instruction_index is unset.
Sourcepub fn instruction_operand_index(&self) -> i32
pub fn instruction_operand_index(&self) -> i32
Returns the value of instruction_operand_index, or the default value if instruction_operand_index is unset.
Sourcepub fn operand_expression_index(&self) -> i32
pub fn operand_expression_index(&self) -> i32
Returns the value of operand_expression_index, or the default value if operand_expression_index is unset.
Sourcepub fn string_table_index(&self) -> i32
pub fn string_table_index(&self) -> i32
Returns the value of string_table_index, or the default value if string_table_index is unset.
Trait Implementations§
Source§impl Message for Reference
impl Message for Reference
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.