pub enum ValueOrigin {
Constant {
value: String,
},
Parameter {
index: usize,
tainted: bool,
},
StateVar {
name: String,
tainted: bool,
},
FunctionCall {
function: String,
tainted: bool,
},
ExternalCall {
address: String,
},
Arithmetic {
operands: Vec<String>,
tainted: bool,
},
Untrusted {
source: String,
},
Unknown,
}Expand description
Represents a variable’s origin and taint status.
Variants§
Constant
Variable is a constant.
Parameter
Variable comes from a parameter.
StateVar
Variable comes from state storage.
FunctionCall
Variable comes from function call.
ExternalCall
Variable comes from external call (always tainted).
Arithmetic
Variable comes from arithmetic operation.
Untrusted
Variable comes from untrusted source.
Unknown
Unknown origin.
Implementations§
Source§impl ValueOrigin
impl ValueOrigin
Sourcepub fn is_tainted(&self) -> bool
pub fn is_tainted(&self) -> bool
Check if value is tainted.
Trait Implementations§
Source§impl Clone for ValueOrigin
impl Clone for ValueOrigin
Source§fn clone(&self) -> ValueOrigin
fn clone(&self) -> ValueOrigin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ValueOrigin
impl Debug for ValueOrigin
Source§impl<'de> Deserialize<'de> for ValueOrigin
impl<'de> Deserialize<'de> for ValueOrigin
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
impl Eq for ValueOrigin
Source§impl Hash for ValueOrigin
impl Hash for ValueOrigin
Source§impl PartialEq for ValueOrigin
impl PartialEq for ValueOrigin
Source§fn eq(&self, other: &ValueOrigin) -> bool
fn eq(&self, other: &ValueOrigin) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ValueOrigin
impl Serialize for ValueOrigin
impl StructuralPartialEq for ValueOrigin
Auto Trait Implementations§
impl Freeze for ValueOrigin
impl RefUnwindSafe for ValueOrigin
impl Send for ValueOrigin
impl Sync for ValueOrigin
impl Unpin for ValueOrigin
impl UnsafeUnpin for ValueOrigin
impl UnwindSafe for ValueOrigin
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.