#[non_exhaustive]pub struct UpgradeNote {
pub package: String,
pub version: Option<Version>,
pub distributions: Vec<UpgradeDistribution>,
pub windows_update: Option<WindowsUpdate>,
/* private fields */
}Expand description
An Upgrade Note represents a potential upgrade of a package to a given version. For each package version combination (i.e. bash 4.0, bash 4.1, bash 4.1.2), there will be an Upgrade Note. For Windows, windows_update field represents the information related to the update.
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.package: StringRequired for non-Windows OS. The package this Upgrade is for.
version: Option<Version>Required for non-Windows OS. The version of the package in machine + human readable form.
distributions: Vec<UpgradeDistribution>Metadata about the upgrade for each specific operating system.
windows_update: Option<WindowsUpdate>Required for Windows OS. Represents the metadata about the Windows update.
Implementations§
Source§impl UpgradeNote
impl UpgradeNote
pub fn new() -> Self
Sourcepub fn set_package<T: Into<String>>(self, v: T) -> Self
pub fn set_package<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_version<T>(self, v: T) -> Self
pub fn set_version<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_version<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_version<T>(self, v: Option<T>) -> Self
Sourcepub fn set_distributions<T, V>(self, v: T) -> Self
pub fn set_distributions<T, V>(self, v: T) -> Self
Sets the value of distributions.
§Example
ⓘ
use google_cloud_grafeas_v1::model::UpgradeDistribution;
let x = UpgradeNote::new()
.set_distributions([
UpgradeDistribution::default()/* use setters */,
UpgradeDistribution::default()/* use (different) setters */,
]);Sourcepub fn set_windows_update<T>(self, v: T) -> Selfwhere
T: Into<WindowsUpdate>,
pub fn set_windows_update<T>(self, v: T) -> Selfwhere
T: Into<WindowsUpdate>,
Sets the value of windows_update.
§Example
ⓘ
use google_cloud_grafeas_v1::model::WindowsUpdate;
let x = UpgradeNote::new().set_windows_update(WindowsUpdate::default()/* use setters */);Sourcepub fn set_or_clear_windows_update<T>(self, v: Option<T>) -> Selfwhere
T: Into<WindowsUpdate>,
pub fn set_or_clear_windows_update<T>(self, v: Option<T>) -> Selfwhere
T: Into<WindowsUpdate>,
Sets or clears the value of windows_update.
§Example
ⓘ
use google_cloud_grafeas_v1::model::WindowsUpdate;
let x = UpgradeNote::new().set_or_clear_windows_update(Some(WindowsUpdate::default()/* use setters */));
let x = UpgradeNote::new().set_or_clear_windows_update(None::<WindowsUpdate>);Trait Implementations§
Source§impl Clone for UpgradeNote
impl Clone for UpgradeNote
Source§fn clone(&self) -> UpgradeNote
fn clone(&self) -> UpgradeNote
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 UpgradeNote
impl Debug for UpgradeNote
Source§impl Default for UpgradeNote
impl Default for UpgradeNote
Source§fn default() -> UpgradeNote
fn default() -> UpgradeNote
Returns the “default value” for a type. Read more
Source§impl Message for UpgradeNote
impl Message for UpgradeNote
Source§impl PartialEq for UpgradeNote
impl PartialEq for UpgradeNote
impl StructuralPartialEq for UpgradeNote
Auto Trait Implementations§
impl Freeze for UpgradeNote
impl RefUnwindSafe for UpgradeNote
impl Send for UpgradeNote
impl Sync for UpgradeNote
impl Unpin for UpgradeNote
impl UnsafeUnpin for UpgradeNote
impl UnwindSafe for UpgradeNote
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