pub struct Comment {
pub instruction_index: Option<i32>,
pub instruction_operand_index: Option<i32>,
pub operand_expression_index: Option<i32>,
pub string_table_index: Option<i32>,
pub repeatable: Option<bool>,
pub type: Option<i32>,
}Fields§
§instruction_index: Option<i32>Index into the global instruction table. This is here to enable comment processing without having to iterate over all instructions. There is an N:M mapping of instructions to comments.
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, like in Reference. This is not currently used, but allows to implement expression substitutions.
string_table_index: Option<i32>Index into the global string table.
repeatable: Option<bool>Comment is propagated to all locations that reference the original location.
type: Option<i32>Implementations§
Source§impl Comment
impl Comment
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.
Sourcepub fn repeatable(&self) -> bool
pub fn repeatable(&self) -> bool
Returns the value of repeatable, or the default value if repeatable is unset.
Trait Implementations§
Source§impl Message for Comment
impl Message for Comment
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.