Type Definition cairo_lang_lowering::destructs::LoweredDemand
source · pub type LoweredDemand = Demand<VariableId>;
Implementations§
source§impl<Var: Hash + Eq + Copy> Demand<Var>
impl<Var: Hash + Eq + Copy> Demand<Var>
sourcepub fn finalize(self) -> bool
pub fn finalize(self) -> bool
Finalizes a demand. Returns a boolean representing success - if all the variable demands were satisfied.
sourcepub fn apply_remapping<V: Into<Var>, T: DemandReporter<Var>>(
&mut self,
reporter: &mut T,
remapping: impl Iterator<Item = (V, V)>,
position: T::UsePosition
)
pub fn apply_remapping<V: Into<Var>, T: DemandReporter<Var>>( &mut self, reporter: &mut T, remapping: impl Iterator<Item = (V, V)>, position: T::UsePosition )
Updates the demand when a variable remapping occurs.
sourcepub fn variables_used<V: Copy + Into<Var>, T: DemandReporter<Var>>(
&mut self,
reporter: &mut T,
vars: &[V],
position: T::UsePosition
)
pub fn variables_used<V: Copy + Into<Var>, T: DemandReporter<Var>>( &mut self, reporter: &mut T, vars: &[V], position: T::UsePosition )
Updates the demand when some variables are used right before the current flow.
sourcepub fn variables_introduced<V: Copy + Into<Var>, T: DemandReporter<Var>>(
&mut self,
reporter: &mut T,
vars: &[V],
position: T::IntroducePosition
)
pub fn variables_introduced<V: Copy + Into<Var>, T: DemandReporter<Var>>( &mut self, reporter: &mut T, vars: &[V], position: T::IntroducePosition )
Updates the demand when some variables are introduced right before the current flow.
sourcepub fn merge_demands<T: DemandReporter<Var>>(
demands: &[(Self, T::IntroducePosition)],
reporter: &mut T
) -> Self
pub fn merge_demands<T: DemandReporter<Var>>( demands: &[(Self, T::IntroducePosition)], reporter: &mut T ) -> Self
Merges Demands from multiple branches into one, reporting diagnostics in the way.
Trait Implementations§
Auto Trait Implementations§
impl<Var> RefUnwindSafe for Demand<Var>where Var: RefUnwindSafe,
impl<Var> Send for Demand<Var>where Var: Send,
impl<Var> Sync for Demand<Var>where Var: Sync,
impl<Var> Unpin for Demand<Var>where Var: Unpin,
impl<Var> UnwindSafe for Demand<Var>where Var: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more