#[non_exhaustive]pub struct PackageNote {
pub name: String,
pub distribution: Vec<Distribution>,
pub package_type: String,
pub cpe_uri: String,
pub architecture: Architecture,
pub version: Option<Version>,
pub maintainer: String,
pub url: String,
pub description: String,
pub license: Option<License>,
pub digest: Vec<Digest>,
/* private fields */
}Expand description
PackageNote represents a particular package version.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe name of the package.
distribution: Vec<Distribution>Deprecated. The various channels by which a package is distributed.
package_type: StringThe type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).
cpe_uri: StringThe cpe_uri in CPE format denoting the package manager version distributing a package. The cpe_uri will be blank for language packages.
architecture: ArchitectureThe CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.
version: Option<Version>The version of the package.
maintainer: StringA freeform text denoting the maintainer of this package.
url: StringThe homepage for this package.
description: StringThe description of this package.
license: Option<License>Licenses that have been declared by the authors of the package.
digest: Vec<Digest>Hash value, typically a file digest, that allows unique identification a specific package.
Implementations§
Source§impl PackageNote
impl PackageNote
pub fn new() -> Self
Sourcepub fn set_distribution<T, V>(self, v: T) -> Self
pub fn set_distribution<T, V>(self, v: T) -> Self
Sets the value of distribution.
§Example
use google_cloud_grafeas_v1::model::Distribution;
let x = PackageNote::new()
.set_distribution([
Distribution::default()/* use setters */,
Distribution::default()/* use (different) setters */,
]);Sourcepub fn set_package_type<T: Into<String>>(self, v: T) -> Self
pub fn set_package_type<T: Into<String>>(self, v: T) -> 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 = PackageNote::new().set_architecture(Architecture::X86);
let x1 = PackageNote::new().set_architecture(Architecture::X64);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_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
Sourcepub fn set_license<T>(self, v: T) -> Self
pub fn set_license<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_license<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_license<T>(self, v: Option<T>) -> Self
Sourcepub fn set_digest<T, V>(self, v: T) -> Self
pub fn set_digest<T, V>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for PackageNote
impl Clone for PackageNote
Source§fn clone(&self) -> PackageNote
fn clone(&self) -> PackageNote
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more