#[non_exhaustive]pub struct Distribution {
pub cpe_uri: String,
pub architecture: Architecture,
pub latest_version: Option<Version>,
pub maintainer: String,
pub url: String,
pub description: String,
/* private fields */
}Expand description
This represents a particular channel of distribution for a given package. E.g., Debian’s jessie-backports dpkg mirror.
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: StringThe cpe_uri in CPE format denoting the package manager version distributing a package.
architecture: ArchitectureThe CPU architecture for which packages in this distribution channel were built.
latest_version: Option<Version>The latest available version of this package in this distribution channel.
maintainer: StringA freeform string denoting the maintainer of this package.
url: StringThe distribution channel-specific homepage for this package.
description: StringThe distribution channel-specific description of this package.
Implementations§
Source§impl Distribution
impl Distribution
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_architecture<T: Into<Architecture>>(self, v: T) -> Self
pub fn set_architecture<T: Into<Architecture>>(self, v: T) -> Self
Sets the value of architecture.
§Example
ⓘ
use google_cloud_grafeas_v1::model::Architecture;
let x0 = Distribution::new().set_architecture(Architecture::X86);
let x1 = Distribution::new().set_architecture(Architecture::X64);Sourcepub fn set_latest_version<T>(self, v: T) -> Self
pub fn set_latest_version<T>(self, v: T) -> Self
Sets the value of latest_version.
§Example
ⓘ
use google_cloud_grafeas_v1::model::Version;
let x = Distribution::new().set_latest_version(Version::default()/* use setters */);Sourcepub fn set_or_clear_latest_version<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_latest_version<T>(self, v: Option<T>) -> Self
Sets or clears the value of latest_version.
§Example
ⓘ
use google_cloud_grafeas_v1::model::Version;
let x = Distribution::new().set_or_clear_latest_version(Some(Version::default()/* use setters */));
let x = Distribution::new().set_or_clear_latest_version(None::<Version>);Sourcepub fn set_maintainer<T: Into<String>>(self, v: T) -> Self
pub fn set_maintainer<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_description<T: Into<String>>(self, v: T) -> Self
pub fn set_description<T: Into<String>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for Distribution
impl Clone for Distribution
Source§fn clone(&self) -> Distribution
fn clone(&self) -> Distribution
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 Distribution
impl Debug for Distribution
Source§impl Default for Distribution
impl Default for Distribution
Source§fn default() -> Distribution
fn default() -> Distribution
Returns the “default value” for a type. Read more
Source§impl Message for Distribution
impl Message for Distribution
Source§impl PartialEq for Distribution
impl PartialEq for Distribution
impl StructuralPartialEq for Distribution
Auto Trait Implementations§
impl Freeze for Distribution
impl RefUnwindSafe for Distribution
impl Send for Distribution
impl Sync for Distribution
impl Unpin for Distribution
impl UnsafeUnpin for Distribution
impl UnwindSafe for Distribution
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