Struct cwe_checker_lib::utils::log::CweWarning
source · pub struct CweWarning {
pub name: String,
pub version: String,
pub addresses: Vec<String>,
pub tids: Vec<String>,
pub symbols: Vec<String>,
pub other: Vec<Vec<String>>,
pub description: String,
}
Expand description
A CWE warning message.
Fields§
§name: String
A short name of the CWE check, e.g. CWE190
.
version: String
The version number of the check.
addresses: Vec<String>
Addresses in the binary associated with the CWE warning. The first address usually denotes the program point where the CWE warning was generated.
tids: Vec<String>
Term IDs associated to the CWE warning.
May be more exact than the addresses, e.g. for Def
terms.
symbols: Vec<String>
Symbol names (usually of extern symbols) associated to the CWE warning.
other: Vec<Vec<String>>
Other useful information. Content depends on the check that generated the CWE warning.
description: String
A short description of the warning that is presented to the user. Should contain all essential information necessary to understand the warning, including the address in the binary for which the warning was generated.
Implementations§
source§impl CweWarning
impl CweWarning
sourcepub fn new(
name: impl ToString,
version: impl ToString,
description: impl ToString
) -> CweWarning
pub fn new( name: impl ToString, version: impl ToString, description: impl ToString ) -> CweWarning
Creates a new CweWarning by only setting name, version and description
sourcepub fn addresses(self, addresses: Vec<String>) -> CweWarning
pub fn addresses(self, addresses: Vec<String>) -> CweWarning
Sets the address field of the CweWarning
sourcepub fn tids(self, tids: Vec<String>) -> CweWarning
pub fn tids(self, tids: Vec<String>) -> CweWarning
Sets the Tids field of the CweWarning
sourcepub fn symbols(self, symbols: Vec<String>) -> CweWarning
pub fn symbols(self, symbols: Vec<String>) -> CweWarning
Sets the symbols field of the CweWarning
Trait Implementations§
source§impl Clone for CweWarning
impl Clone for CweWarning
source§fn clone(&self) -> CweWarning
fn clone(&self) -> CweWarning
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CweWarning
impl Debug for CweWarning
source§impl Default for CweWarning
impl Default for CweWarning
source§fn default() -> CweWarning
fn default() -> CweWarning
source§impl<'de> Deserialize<'de> for CweWarning
impl<'de> Deserialize<'de> for CweWarning
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 CweWarning
impl Display for CweWarning
source§impl From<CweWarning> for LogThreadMsg
impl From<CweWarning> for LogThreadMsg
source§fn from(warning: CweWarning) -> Self
fn from(warning: CweWarning) -> Self
source§impl Hash for CweWarning
impl Hash for CweWarning
source§impl Ord for CweWarning
impl Ord for CweWarning
source§fn cmp(&self, other: &CweWarning) -> Ordering
fn cmp(&self, other: &CweWarning) -> 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 CweWarning
impl PartialEq for CweWarning
source§fn eq(&self, other: &CweWarning) -> bool
fn eq(&self, other: &CweWarning) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for CweWarning
impl PartialOrd for CweWarning
source§fn partial_cmp(&self, other: &CweWarning) -> Option<Ordering>
fn partial_cmp(&self, other: &CweWarning) -> 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 CweWarning
impl Serialize for CweWarning
impl Eq for CweWarning
impl StructuralEq for CweWarning
impl StructuralPartialEq for CweWarning
Auto Trait Implementations§
impl RefUnwindSafe for CweWarning
impl Send for CweWarning
impl Sync for CweWarning
impl Unpin for CweWarning
impl UnwindSafe for CweWarning
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.