Struct cwe_checker_lib::analysis::function_signature::AccessPattern
source · pub struct AccessPattern { /* private fields */ }
Expand description
Access flags to track different kind of access/usage patterns of a variable.
Implementations§
source§impl AccessPattern
impl AccessPattern
sourcepub fn new_unknown_access() -> Self
pub fn new_unknown_access() -> Self
Generate a new AccessPattern
object with all access flags set to true (to model unknown access).
sourcepub fn with_read_flag(self) -> Self
pub fn with_read_flag(self) -> Self
Set the access flag for read access and return self
.
sourcepub fn with_dereference_flag(self) -> Self
pub fn with_dereference_flag(self) -> Self
Set the access flag for immutable pointer dereference and return self
.
sourcepub fn with_mutably_dereferenced_flag(self) -> Self
pub fn with_mutably_dereferenced_flag(self) -> Self
Set the access flag for pointer dereference with write access to the pointer target and return self
.
sourcepub fn set_dereference_flag(&mut self)
pub fn set_dereference_flag(&mut self)
Set the access flag for immutable pointer dereference.
sourcepub fn set_read_flag(&mut self)
pub fn set_read_flag(&mut self)
Set the access flag for read access.
sourcepub fn set_mutably_dereferenced_flag(&mut self)
pub fn set_mutably_dereferenced_flag(&mut self)
Set the access flag for pointer dereference (with write access to the target of the pointer).
sourcepub fn set_unknown_access_flags(&mut self)
pub fn set_unknown_access_flags(&mut self)
Set all access flags to indicate that any kind of access to the variable may have occured.
sourcepub fn is_accessed(&self) -> bool
pub fn is_accessed(&self) -> bool
Returns true if any of the access flags is set.
sourcepub fn is_dereferenced(&self) -> bool
pub fn is_dereferenced(&self) -> bool
Returns true if the dereferenced or mutably dereferenced access flag is set.
sourcepub fn is_mutably_dereferenced(&self) -> bool
pub fn is_mutably_dereferenced(&self) -> bool
Returns true if the mutably dereferenced access flag is set.
Trait Implementations§
source§impl AbstractDomain for AccessPattern
impl AbstractDomain for AccessPattern
source§impl Clone for AccessPattern
impl Clone for AccessPattern
source§fn clone(&self) -> AccessPattern
fn clone(&self) -> AccessPattern
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for AccessPattern
impl Debug for AccessPattern
source§impl Default for AccessPattern
impl Default for AccessPattern
source§impl<'de> Deserialize<'de> for AccessPattern
impl<'de> Deserialize<'de> for AccessPattern
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 Display for AccessPattern
impl Display for AccessPattern
source§impl Ord for AccessPattern
impl Ord for AccessPattern
source§fn cmp(&self, other: &AccessPattern) -> Ordering
fn cmp(&self, other: &AccessPattern) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for AccessPattern
impl PartialEq for AccessPattern
source§fn eq(&self, other: &AccessPattern) -> bool
fn eq(&self, other: &AccessPattern) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for AccessPattern
impl PartialOrd for AccessPattern
source§fn partial_cmp(&self, other: &AccessPattern) -> Option<Ordering>
fn partial_cmp(&self, other: &AccessPattern) -> Option<Ordering>
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 moresource§impl Serialize for AccessPattern
impl Serialize for AccessPattern
impl Copy for AccessPattern
impl Eq for AccessPattern
impl StructuralEq for AccessPattern
impl StructuralPartialEq for AccessPattern
Auto Trait Implementations§
impl RefUnwindSafe for AccessPattern
impl Send for AccessPattern
impl Sync for AccessPattern
impl Unpin for AccessPattern
impl UnwindSafe for AccessPattern
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.