#[non_exhaustive]pub struct UpgradeDistribution {
pub cpe_uri: String,
pub classification: String,
pub severity: String,
pub cve: Vec<String>,
/* private fields */
}Expand description
The Upgrade Distribution represents metadata about the Upgrade for each operating system (CPE). Some distributions have additional metadata around updates, classifying them into various categories and severities.
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.cpe_uri: StringRequired - The specific operating system this metadata applies to. See https://cpe.mitre.org/specification/.
classification: StringThe operating system classification of this Upgrade, as specified by the upstream operating system upgrade feed. For Windows the classification is one of the category_ids listed at https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)
severity: StringThe severity as specified by the upstream operating system.
cve: Vec<String>The cve tied to this Upgrade.
Implementations§
Source§impl UpgradeDistribution
impl UpgradeDistribution
pub fn new() -> Self
Sourcepub fn set_cpe_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_cpe_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_classification<T: Into<String>>(self, v: T) -> Self
pub fn set_classification<T: Into<String>>(self, v: T) -> Self
Sets the value of classification.
§Example
ⓘ
let x = UpgradeDistribution::new().set_classification("example");Sourcepub fn set_severity<T: Into<String>>(self, v: T) -> Self
pub fn set_severity<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for UpgradeDistribution
impl Clone for UpgradeDistribution
Source§fn clone(&self) -> UpgradeDistribution
fn clone(&self) -> UpgradeDistribution
Returns a duplicate of the value. Read more
1.0.0 · 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 UpgradeDistribution
impl Debug for UpgradeDistribution
Source§impl Default for UpgradeDistribution
impl Default for UpgradeDistribution
Source§fn default() -> UpgradeDistribution
fn default() -> UpgradeDistribution
Returns the “default value” for a type. Read more
Source§impl Message for UpgradeDistribution
impl Message for UpgradeDistribution
Source§impl PartialEq for UpgradeDistribution
impl PartialEq for UpgradeDistribution
impl StructuralPartialEq for UpgradeDistribution
Auto Trait Implementations§
impl Freeze for UpgradeDistribution
impl RefUnwindSafe for UpgradeDistribution
impl Send for UpgradeDistribution
impl Sync for UpgradeDistribution
impl Unpin for UpgradeDistribution
impl UnsafeUnpin for UpgradeDistribution
impl UnwindSafe for UpgradeDistribution
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