Struct cwe_checker_lib::intermediate_representation::Tid
source · pub struct Tid {
pub address: String,
/* private fields */
}
Expand description
A term identifier consisting of an ID string (which is required to be unique) and an address to indicate where the term is located.
Fields§
§address: String
The address where the term is located.
Implementations§
source§impl Tid
impl Tid
sourcepub fn new<T: ToString>(val: T) -> Tid
pub fn new<T: ToString>(val: T) -> Tid
Generate a new term identifier with the given ID string and with unknown address.
sourcepub fn with_id_suffix(self, suffix: &str) -> Self
pub fn with_id_suffix(self, suffix: &str) -> Self
Add a suffix to the ID string and return the new Tid
sourcepub fn has_id_suffix(&self, suffix: &str) -> bool
pub fn has_id_suffix(&self, suffix: &str) -> bool
Returns true if the ID string ends with the provided suffix.
sourcepub fn blk_id_at_address(address: &str) -> Tid
pub fn blk_id_at_address(address: &str) -> Tid
Generate the ID of a block starting at the given address.
Note that the block may not actually exist. For cases where one assembly instruction generates more than one block, the returned block ID is the one that would be executed first if a jump to the given address happened.
sourcepub fn artificial_sink_block(suffix: &str) -> Self
pub fn artificial_sink_block(suffix: &str) -> Self
Returns a new ID for an artificial sink block with the given suffix.
sourcepub fn artificial_sink_sub() -> Self
pub fn artificial_sink_sub() -> Self
Returns a new ID for the artificial sink sub.
sourcepub fn is_artificial_sink_block(&self, suffix: &str) -> bool
pub fn is_artificial_sink_block(&self, suffix: &str) -> bool
Returns true iff the ID is for the artificial sink block with the given suffix.
sourcepub fn is_artificial_sink_sub(&self) -> bool
pub fn is_artificial_sink_sub(&self) -> bool
Returns true iff the ID is for the artificial sink sub.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Tid
impl<'de> Deserialize<'de> for Tid
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>,
source§impl Ord for Tid
impl Ord for Tid
source§impl PartialOrd for Tid
impl PartialOrd for Tid
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Tid
impl StructuralEq for Tid
impl StructuralPartialEq for Tid
Auto Trait Implementations§
impl RefUnwindSafe for Tid
impl Send for Tid
impl Sync for Tid
impl Unpin for Tid
impl UnwindSafe for Tid
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.