Struct bytecode_source_map::source_map::StructSourceMap
source · pub struct StructSourceMap {
pub decl_location: Loc,
pub type_parameters: Vec<SourceName>,
pub fields: Vec<Loc>,
}
Fields§
§decl_location: Loc
The source declaration location of the struct
type_parameters: Vec<SourceName>
Important: type parameters need to be added in the order of their declaration
fields: Vec<Loc>
Note that fields to a struct source map need to be added in the order of the fields in the struct definition.
Implementations§
source§impl StructSourceMap
impl StructSourceMap
pub fn new(decl_location: Loc) -> Self
pub fn add_type_parameter(&mut self, type_name: SourceName)
pub fn get_type_parameter_name( &self, type_parameter_idx: usize ) -> Option<SourceName>
pub fn add_field_location(&mut self, field_loc: Loc)
pub fn get_field_location(&self, field_index: MemberCount) -> Option<Loc>
pub fn dummy_struct_map( &mut self, view: &BinaryIndexedView<'_>, struct_def: &StructDefinition, default_loc: Loc ) -> Result<()>
Trait Implementations§
source§impl Clone for StructSourceMap
impl Clone for StructSourceMap
source§fn clone(&self) -> StructSourceMap
fn clone(&self) -> StructSourceMap
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 StructSourceMap
impl Debug for StructSourceMap
source§impl<'de> Deserialize<'de> for StructSourceMap
impl<'de> Deserialize<'de> for StructSourceMap
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more