pub struct StrictByShapePolicy;Expand description
A policy that forces or defers each argument by its Demand.
Positions demanding a value are evaluated eagerly; positions demanding an expression (or nothing) become lazy thunks.
Trait Implementations§
Source§impl EvalPolicy for StrictByShapePolicy
impl EvalPolicy for StrictByShapePolicy
Source§fn allow_macro_expansion(&self, phase: Phase) -> bool
fn allow_macro_expansion(&self, phase: Phase) -> bool
Source§fn prepare_call_args(
&self,
cx: &mut Cx,
raw: RawArgs,
demands: &[Demand],
) -> Result<PreparedArgs>
fn prepare_call_args( &self, cx: &mut Cx, raw: RawArgs, demands: &[Demand], ) -> Result<PreparedArgs>
Prepares raw call arguments into
PreparedArgs per the demands. Read moreSource§fn force(&self, cx: &mut Cx, value: Value, demand: Demand) -> Result<Value>
fn force(&self, cx: &mut Cx, value: Value, demand: Demand) -> Result<Value>
Forces
value far enough to satisfy demand.Source§fn eval_expr(&self, cx: &mut Cx, expr: Expr) -> Result<Value>
fn eval_expr(&self, cx: &mut Cx, expr: Expr) -> Result<Value>
Evaluates a bare expression to a value under this policy.
Auto Trait Implementations§
impl Freeze for StrictByShapePolicy
impl RefUnwindSafe for StrictByShapePolicy
impl Send for StrictByShapePolicy
impl Sync for StrictByShapePolicy
impl Unpin for StrictByShapePolicy
impl UnsafeUnpin for StrictByShapePolicy
impl UnwindSafe for StrictByShapePolicy
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