pub struct FunctionTargetsHolder { /* private fields */ }
Expand description
A data structure which holds data for multiple function targets, and allows to manipulate them as part of a transformation pipeline.
Implementations§
source§impl FunctionTargetsHolder
impl FunctionTargetsHolder
sourcepub fn get_funs(&self) -> impl Iterator<Item = QualifiedId<FunId>> + '_
pub fn get_funs(&self) -> impl Iterator<Item = QualifiedId<FunId>> + '_
Get an iterator for all functions this holder.
sourcepub fn get_funs_and_variants(
&self
) -> impl Iterator<Item = (QualifiedId<FunId>, FunctionVariant)> + '_
pub fn get_funs_and_variants( &self ) -> impl Iterator<Item = (QualifiedId<FunId>, FunctionVariant)> + '_
Gets an iterator for all functions and variants in this holder.
sourcepub fn add_target(&mut self, func_env: &FunctionEnv<'_>)
pub fn add_target(&mut self, func_env: &FunctionEnv<'_>)
Adds a new function target. The target will be initialized from the Move byte code.
sourcepub fn get_target<'env>(
&'env self,
func_env: &'env FunctionEnv<'env>,
variant: &FunctionVariant
) -> FunctionTarget<'env>
pub fn get_target<'env>( &'env self, func_env: &'env FunctionEnv<'env>, variant: &FunctionVariant ) -> FunctionTarget<'env>
Gets a function target for read-only consumption, for the given variant.
sourcepub fn get_target_variants(
&self,
func_env: &FunctionEnv<'_>
) -> Vec<FunctionVariant> ⓘ
pub fn get_target_variants( &self, func_env: &FunctionEnv<'_> ) -> Vec<FunctionVariant> ⓘ
Gets all available variants for function.
sourcepub fn get_targets<'env>(
&'env self,
func_env: &'env FunctionEnv<'env>
) -> Vec<(FunctionVariant, FunctionTarget<'env>)> ⓘ
pub fn get_targets<'env>( &'env self, func_env: &'env FunctionEnv<'env> ) -> Vec<(FunctionVariant, FunctionTarget<'env>)> ⓘ
Gets targets for all available variants.
sourcepub fn get_data(
&self,
id: &QualifiedId<FunId>,
variant: &FunctionVariant
) -> Option<&FunctionData>
pub fn get_data( &self, id: &QualifiedId<FunId>, variant: &FunctionVariant ) -> Option<&FunctionData>
Gets function data for a variant.
sourcepub fn get_data_mut(
&mut self,
id: &QualifiedId<FunId>,
variant: &FunctionVariant
) -> Option<&mut FunctionData>
pub fn get_data_mut( &mut self, id: &QualifiedId<FunId>, variant: &FunctionVariant ) -> Option<&mut FunctionData>
Gets mutable function data for a variant.
sourcepub fn remove_target_data(
&mut self,
id: &QualifiedId<FunId>,
variant: &FunctionVariant
) -> FunctionData
pub fn remove_target_data( &mut self, id: &QualifiedId<FunId>, variant: &FunctionVariant ) -> FunctionData
Removes function data for a variant.
sourcepub fn insert_target_data(
&mut self,
id: &QualifiedId<FunId>,
variant: FunctionVariant,
data: FunctionData
)
pub fn insert_target_data( &mut self, id: &QualifiedId<FunId>, variant: FunctionVariant, data: FunctionData )
Sets function data for a function’s variant.
Trait Implementations§
source§impl Debug for FunctionTargetsHolder
impl Debug for FunctionTargetsHolder
source§impl Default for FunctionTargetsHolder
impl Default for FunctionTargetsHolder
source§fn default() -> FunctionTargetsHolder
fn default() -> FunctionTargetsHolder
Returns the “default value” for a type. Read more