#[non_exhaustive]pub struct Metadata {
pub build_invocation_id: String,
pub build_started_on: Option<Timestamp>,
pub build_finished_on: Option<Timestamp>,
pub completeness: Option<Completeness>,
pub reproducible: bool,
/* private fields */
}Expand description
Other properties of the build.
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.build_invocation_id: StringIdentifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.
build_started_on: Option<Timestamp>The timestamp of when the build started.
build_finished_on: Option<Timestamp>The timestamp of when the build completed.
completeness: Option<Completeness>Indicates that the builder claims certain fields in this message to be complete.
reproducible: boolIf true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.
Implementations§
Source§impl Metadata
impl Metadata
pub fn new() -> Self
Sourcepub fn set_build_invocation_id<T: Into<String>>(self, v: T) -> Self
pub fn set_build_invocation_id<T: Into<String>>(self, v: T) -> Self
Sets the value of build_invocation_id.
§Example
let x = Metadata::new().set_build_invocation_id("example");Sourcepub fn set_build_started_on<T>(self, v: T) -> Self
pub fn set_build_started_on<T>(self, v: T) -> Self
Sets the value of build_started_on.
§Example
use wkt::Timestamp;
let x = Metadata::new().set_build_started_on(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_build_started_on<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_build_started_on<T>(self, v: Option<T>) -> Self
Sets or clears the value of build_started_on.
§Example
use wkt::Timestamp;
let x = Metadata::new().set_or_clear_build_started_on(Some(Timestamp::default()/* use setters */));
let x = Metadata::new().set_or_clear_build_started_on(None::<Timestamp>);Sourcepub fn set_build_finished_on<T>(self, v: T) -> Self
pub fn set_build_finished_on<T>(self, v: T) -> Self
Sets the value of build_finished_on.
§Example
use wkt::Timestamp;
let x = Metadata::new().set_build_finished_on(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_build_finished_on<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_build_finished_on<T>(self, v: Option<T>) -> Self
Sets or clears the value of build_finished_on.
§Example
use wkt::Timestamp;
let x = Metadata::new().set_or_clear_build_finished_on(Some(Timestamp::default()/* use setters */));
let x = Metadata::new().set_or_clear_build_finished_on(None::<Timestamp>);Sourcepub fn set_completeness<T>(self, v: T) -> Selfwhere
T: Into<Completeness>,
pub fn set_completeness<T>(self, v: T) -> Selfwhere
T: Into<Completeness>,
Sets the value of completeness.
§Example
use google_cloud_grafeas_v1::model::Completeness;
let x = Metadata::new().set_completeness(Completeness::default()/* use setters */);Sourcepub fn set_or_clear_completeness<T>(self, v: Option<T>) -> Selfwhere
T: Into<Completeness>,
pub fn set_or_clear_completeness<T>(self, v: Option<T>) -> Selfwhere
T: Into<Completeness>,
Sets or clears the value of completeness.
§Example
use google_cloud_grafeas_v1::model::Completeness;
let x = Metadata::new().set_or_clear_completeness(Some(Completeness::default()/* use setters */));
let x = Metadata::new().set_or_clear_completeness(None::<Completeness>);