[][src]Struct gf::pivot::fragment::FragmentDefsUses

pub struct FragmentDefsUses<'a> { /* fields omitted */ }

🟢 Defined and used variables of a sealed fragment.

Definitions and uses are prebuilt for all sealed fragments, and can be retrieved via Fragment::defs_uses.


impl<'a> FragmentDefsUses<'a>[src]

pub unsafe fn from_unsealed(
    fragment: Fragment<'a>,
    unsealed: &'a UnsealedFragmentDefsUses
) -> Self

Wrap an unsealed defined and used variable structure.

pub fn fragment(&self) -> Fragment<'a>[src]

Return parent fragment.

pub fn vars(&self) -> &'a [Var][src]

Return all variables defined and/or used in the fragment in increasing order of their numbers.

pub fn def(&self, var: Var) -> Option<Loc<'a>>[src]

Return variable definition.

Tail locations correspond to inputs of basic blocks.

pub fn uses(&self, var: Var) -> impl Iterator<Item = Loc<'a>> + '_[src]

Return an iterator over variable uses.

Tail locations correspond to outputs of basic blocks.

Trait Implementations

impl<'a> Clone for FragmentDefsUses<'a>[src]

impl<'a> Copy for FragmentDefsUses<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for FragmentDefsUses<'a>

impl<'a> Send for FragmentDefsUses<'a>

impl<'a> Sync for FragmentDefsUses<'a>

impl<'a> Unpin for FragmentDefsUses<'a>

impl<'a> UnwindSafe for FragmentDefsUses<'a>

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.