pub type LoweredDemand = Demand<VariableId>;

Implementations§

source§

impl<Var: Hash + Eq + Copy> Demand<Var>

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<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.

source

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.

source

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.

source

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§

source§

impl<Var: Clone + Hash + Eq + Copy> Clone for Demand<Var>

source§

fn clone(&self) -> Demand<Var>

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> Default for Demand<Var>

source§

fn default() -> Self

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

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> 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,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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<T0, T1, E, TRewriter> SemanticRewriter<(T0, T1), E> for TRewriterwhere TRewriter: SemanticRewriter<T0, E> + SemanticRewriter<T1, E>,

source§

fn rewrite(&mut self, value: (T0, T1)) -> Result<(T0, T1), E>

source§

impl<T, E, TRewriter> SemanticRewriter<Box<T, Global>, E> for TRewriterwhere T: Clone, TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Box<T, Global>) -> Result<Box<T, Global>, E>

source§

impl<T, E, TRewriter> SemanticRewriter<Option<T>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Option<T>) -> Result<Option<T>, E>

source§

impl<T, E, TRewriter, E2> SemanticRewriter<Result<T, E2>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Result<T, E2>) -> Result<Result<T, E2>, E>

source§

impl<T, E, TRewriter> SemanticRewriter<Vec<T, Global>, E> for TRewriterwhere TRewriter: SemanticRewriter<T, E>,

source§

fn rewrite(&mut self, value: Vec<T, Global>) -> Result<Vec<T, Global>, E>

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
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.
source§

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

Performs the conversion.
source§

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

source§

fn upcast(&self) -> &T

source§

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

source§

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