pub struct NoopEvalPolicy;Expand description
A policy that quotes every argument and refuses to evaluate expressions.
Useful as a placeholder where no real evaluation strategy is installed:
arguments are passed through as quoted expression values and
eval_expr returns an error.
Trait Implementations§
Source§impl EvalPolicy for NoopEvalPolicy
impl EvalPolicy for NoopEvalPolicy
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.
Source§fn allow_macro_expansion(&self, _phase: Phase) -> bool
fn allow_macro_expansion(&self, _phase: Phase) -> bool
Auto Trait Implementations§
impl Freeze for NoopEvalPolicy
impl RefUnwindSafe for NoopEvalPolicy
impl Send for NoopEvalPolicy
impl Sync for NoopEvalPolicy
impl Unpin for NoopEvalPolicy
impl UnsafeUnpin for NoopEvalPolicy
impl UnwindSafe for NoopEvalPolicy
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