Trait Input
pub trait Input {
// Provided methods
fn resolve_arg(
&mut self,
expr_arg: &ExprArg,
projection: &Projection,
) -> Option<Expr> { ... }
fn resolve_ref(
&mut self,
expr_reference: &ExprReference,
projection: &Projection,
) -> Option<Expr> { ... }
}Expand description
Provides runtime argument and reference resolution for expression evaluation and substitution.
During expression evaluation, Arg and Reference nodes are resolved
by calling methods on an Input implementation. The default methods
return None (unresolved).
§Examples
use toasty_core::stmt::{ConstInput, Input};
// ConstInput resolves nothing -- suitable for expressions with no
// external arguments.
let mut input = ConstInput::new();Provided Methods§
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.
Returns Some(expr) if the argument can be resolved, or None
if it cannot.
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.
Returns Some(expr) if the reference can be resolved, or None
if it cannot.