pub type DestructAdderDemand = Demand<VariableId, (), PanicState>;

Aliased Type§

struct DestructAdderDemand {
    pub vars: OrderedHashMap<Id<Variable>, ()>,
    pub aux: PanicState,
}

Fields§

§vars: OrderedHashMap<Id<Variable>, ()>§aux: PanicState

Implementations§

source§

impl<Var: Hash + Eq + Copy, UsePosition: Copy, Aux: Clone + Default + AuxCombine> Demand<Var, UsePosition, Aux>

source

pub fn finalize(self) -> bool

Finalizes a demand. Returns a boolean representing success - if all the variable demands were satisfied.

source

pub fn apply_remapping<'a, V: Copy + Into<Var> + 'a, T: DemandReporter<Var, Aux, UsePosition = UsePosition>>( &mut self, reporter: &mut T, remapping: impl Iterator<Item = (&'a V, (&'a V, T::UsePosition))> + DoubleEndedIterator + ExactSizeIterator )

Updates the demand when a variable remapping occurs.

source

pub fn variables_used<'a, V: Copy + Into<Var> + 'a, T: DemandReporter<Var, Aux, UsePosition = UsePosition>>( &mut self, reporter: &mut T, vars: impl Iterator<Item = (&'a V, T::UsePosition)> + DoubleEndedIterator + ExactSizeIterator )

Updates the demand when some variables are used right before the current flow.

source

pub fn variables_introduced<V: Copy + Into<Var>, T: DemandReporter<Var, Aux>>( &mut self, reporter: &mut T, vars: &[V], position: T::IntroducePosition )

Updates the demand when some variables are introduced right before the current flow.

source

pub fn merge_demands<T: DemandReporter<Var, Aux>>( demands: &[(Self, T::IntroducePosition)], reporter: &mut T ) -> Self

Merges Demands from multiple branches into one, reporting diagnostics in the way.

Trait Implementations§

source§

impl<Var: Clone + Hash + Eq + Copy, UsePosition: Clone, Aux: Clone + Clone + Default> Clone for Demand<Var, UsePosition, Aux>

source§

fn clone(&self) -> Demand<Var, UsePosition, Aux>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<Var: Hash + Eq + Copy, UsePosition, Aux: Clone + Default> Default for Demand<Var, UsePosition, Aux>

source§

fn default() -> Self

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