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

source

pub fn get_funs(&self) -> impl Iterator<Item = QualifiedId<FunId>> + '_

Get an iterator for all functions this holder.

source

pub fn get_funs_and_variants( &self ) -> impl Iterator<Item = (QualifiedId<FunId>, FunctionVariant)> + '_

Gets an iterator for all functions and variants in this holder.

source

pub fn add_target(&mut self, func_env: &FunctionEnv<'_>)

Adds a new function target. The target will be initialized from the Move byte code.

source

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.

source

pub fn get_target_variants( &self, func_env: &FunctionEnv<'_> ) -> Vec<FunctionVariant>

Gets all available variants for function.

source

pub fn get_targets<'env>( &'env self, func_env: &'env FunctionEnv<'env> ) -> Vec<(FunctionVariant, FunctionTarget<'env>)>

Gets targets for all available variants.

source

pub fn get_data( &self, id: &QualifiedId<FunId>, variant: &FunctionVariant ) -> Option<&FunctionData>

Gets function data for a variant.

source

pub fn get_data_mut( &mut self, id: &QualifiedId<FunId>, variant: &FunctionVariant ) -> Option<&mut FunctionData>

Gets mutable function data for a variant.

source

pub fn remove_target_data( &mut self, id: &QualifiedId<FunId>, variant: &FunctionVariant ) -> FunctionData

Removes function data for a variant.

source

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

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for FunctionTargetsHolder

source§

fn default() -> FunctionTargetsHolder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V