pub struct ScriptAnalysisResult {
pub accessed_variables: HashSet<String>,
pub local_variables: HashSet<String>,
pub string_comparisons: HashMap<String, HashSet<String>>,
}Expand description
The result of a static analysis pass over a Rhai AST.
Fields§
§accessed_variables: HashSet<String>All unique, fully-qualified variable paths accessed in the script
(e.g. "tx.value", "log.name").
local_variables: HashSet<String>Local variables defined within the script via let or loop iteration
variables.
string_comparisons: HashMap<String, HashSet<String>>Maps a fully-qualified variable path to the set of string literals it
is compared against (via == or !=) anywhere in the script.
Example: log.name == "Transfer" produces
"log.name" => {"Transfer"}.
Trait Implementations§
Source§impl Debug for ScriptAnalysisResult
impl Debug for ScriptAnalysisResult
Source§impl Default for ScriptAnalysisResult
impl Default for ScriptAnalysisResult
Source§fn default() -> ScriptAnalysisResult
fn default() -> ScriptAnalysisResult
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ScriptAnalysisResult
impl RefUnwindSafe for ScriptAnalysisResult
impl Send for ScriptAnalysisResult
impl Sync for ScriptAnalysisResult
impl Unpin for ScriptAnalysisResult
impl UnsafeUnpin for ScriptAnalysisResult
impl UnwindSafe for ScriptAnalysisResult
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