Struct ConstInput
pub struct ConstInput {}Expand description
An Input implementation that resolves nothing.
Use ConstInput when evaluating expressions that contain no external
arguments or references (i.e., constant expressions).
§Examples
use toasty_core::stmt::{ConstInput, Value, Expr};
let expr = Expr::from(Value::from(42_i64));
let result = expr.eval(ConstInput::new()).unwrap();
assert_eq!(result, Value::from(42_i64));Implementations§
§impl ConstInput
impl ConstInput
pub fn new() -> ConstInput
pub fn new() -> ConstInput
Creates a new ConstInput.
Trait Implementations§
§impl Debug for ConstInput
impl Debug for ConstInput
§impl Default for ConstInput
impl Default for ConstInput
§fn default() -> ConstInput
fn default() -> ConstInput
Returns the “default value” for a type. Read more
§impl Input for ConstInput
impl Input for ConstInput
§fn resolve_arg(
&mut self,
expr_arg: &ExprArg,
projection: &Projection,
) -> Option<Expr>
fn resolve_arg( &mut self, expr_arg: &ExprArg, projection: &Projection, ) -> Option<Expr>
Resolves an argument expression at the given projection. Read more
§fn resolve_ref(
&mut self,
expr_reference: &ExprReference,
projection: &Projection,
) -> Option<Expr>
fn resolve_ref( &mut self, expr_reference: &ExprReference, projection: &Projection, ) -> Option<Expr>
Resolves a reference expression at the given projection. Read more
Auto Trait Implementations§
impl Freeze for ConstInput
impl RefUnwindSafe for ConstInput
impl Send for ConstInput
impl Sync for ConstInput
impl Unpin for ConstInput
impl UnwindSafe for ConstInput
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