pub struct DataFlow {
pub origins: HashMap<String, ValueOrigin>,
pub def_use_chains: Vec<DefUse>,
pub tainted_vars: HashSet<String>,
pub dependencies: HashMap<String, HashSet<String>>,
}Expand description
DataFlow analysis result for a function.
Fields§
§origins: HashMap<String, ValueOrigin>Variable origins.
def_use_chains: Vec<DefUse>Definition-use chains.
tainted_vars: HashSet<String>Tainted variables.
dependencies: HashMap<String, HashSet<String>>Data dependencies.
Implementations§
Source§impl DataFlow
impl DataFlow
Sourcepub fn is_tainted(&self, var: &str) -> bool
pub fn is_tainted(&self, var: &str) -> bool
Check if a variable is tainted.
Sourcepub fn transitive_dependents(&self, var: &str) -> HashSet<String>
pub fn transitive_dependents(&self, var: &str) -> HashSet<String>
Get all variables that depend on a given variable.
Sourcepub fn can_affect(&self, a: &str, b: &str) -> bool
pub fn can_affect(&self, a: &str, b: &str) -> bool
Check if variable a can affect variable b.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DataFlow
impl<'de> Deserialize<'de> for DataFlow
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DataFlow
impl RefUnwindSafe for DataFlow
impl Send for DataFlow
impl Sync for DataFlow
impl Unpin for DataFlow
impl UnsafeUnpin for DataFlow
impl UnwindSafe for DataFlow
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