#[non_exhaustive]pub struct Cwe {
pub id: String,
pub references: Vec<Reference>,
/* private fields */
}Expand description
CWE stands for Common Weakness Enumeration. Information about this weakness, as described by CWE.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringThe CWE identifier, e.g. CWE-94
references: Vec<Reference>Any reference to the details on the CWE, for example, https://cwe.mitre.org/data/definitions/94.html
Implementations§
Source§impl Cwe
impl Cwe
pub fn new() -> Self
Sourcepub fn set_references<T, V>(self, v: T) -> Self
pub fn set_references<T, V>(self, v: T) -> Self
Sets the value of references.
§Example
ⓘ
use google_cloud_securitycenter_v2::model::Reference;
let x = Cwe::new()
.set_references([
Reference::default()/* use setters */,
Reference::default()/* use (different) setters */,
]);Trait Implementations§
impl StructuralPartialEq for Cwe
Auto Trait Implementations§
impl Freeze for Cwe
impl RefUnwindSafe for Cwe
impl Send for Cwe
impl Sync for Cwe
impl Unpin for Cwe
impl UnwindSafe for Cwe
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