#[non_exhaustive]pub struct SBOMReferenceOccurrence {
pub payload: Option<SbomReferenceIntotoPayload>,
pub payload_type: String,
pub signatures: Vec<EnvelopeSignature>,
/* private fields */
}Expand description
The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more details.
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.payload: Option<SbomReferenceIntotoPayload>The actual payload that contains the SBOM reference data.
payload_type: StringThe kind of payload that SbomReferenceIntotoPayload takes. Since it’s in the intoto format, this value is expected to be ‘application/vnd.in-toto+json’.
signatures: Vec<EnvelopeSignature>The signatures over the payload.
Implementations§
Source§impl SBOMReferenceOccurrence
impl SBOMReferenceOccurrence
pub fn new() -> Self
Sourcepub fn set_payload<T>(self, v: T) -> Selfwhere
T: Into<SbomReferenceIntotoPayload>,
pub fn set_payload<T>(self, v: T) -> Selfwhere
T: Into<SbomReferenceIntotoPayload>,
Sourcepub fn set_or_clear_payload<T>(self, v: Option<T>) -> Selfwhere
T: Into<SbomReferenceIntotoPayload>,
pub fn set_or_clear_payload<T>(self, v: Option<T>) -> Selfwhere
T: Into<SbomReferenceIntotoPayload>,
Sets or clears the value of payload.
§Example
ⓘ
use google_cloud_grafeas_v1::model::SbomReferenceIntotoPayload;
let x = SBOMReferenceOccurrence::new().set_or_clear_payload(Some(SbomReferenceIntotoPayload::default()/* use setters */));
let x = SBOMReferenceOccurrence::new().set_or_clear_payload(None::<SbomReferenceIntotoPayload>);Sourcepub fn set_payload_type<T: Into<String>>(self, v: T) -> Self
pub fn set_payload_type<T: Into<String>>(self, v: T) -> Self
Sets the value of payload_type.
§Example
ⓘ
let x = SBOMReferenceOccurrence::new().set_payload_type("example");Sourcepub fn set_signatures<T, V>(self, v: T) -> Self
pub fn set_signatures<T, V>(self, v: T) -> Self
Sets the value of signatures.
§Example
ⓘ
use google_cloud_grafeas_v1::model::EnvelopeSignature;
let x = SBOMReferenceOccurrence::new()
.set_signatures([
EnvelopeSignature::default()/* use setters */,
EnvelopeSignature::default()/* use (different) setters */,
]);Trait Implementations§
Source§impl Clone for SBOMReferenceOccurrence
impl Clone for SBOMReferenceOccurrence
Source§fn clone(&self) -> SBOMReferenceOccurrence
fn clone(&self) -> SBOMReferenceOccurrence
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 SBOMReferenceOccurrence
impl Debug for SBOMReferenceOccurrence
Source§impl Default for SBOMReferenceOccurrence
impl Default for SBOMReferenceOccurrence
Source§fn default() -> SBOMReferenceOccurrence
fn default() -> SBOMReferenceOccurrence
Returns the “default value” for a type. Read more
Source§impl Message for SBOMReferenceOccurrence
impl Message for SBOMReferenceOccurrence
Source§impl PartialEq for SBOMReferenceOccurrence
impl PartialEq for SBOMReferenceOccurrence
impl StructuralPartialEq for SBOMReferenceOccurrence
Auto Trait Implementations§
impl Freeze for SBOMReferenceOccurrence
impl RefUnwindSafe for SBOMReferenceOccurrence
impl Send for SBOMReferenceOccurrence
impl Sync for SBOMReferenceOccurrence
impl Unpin for SBOMReferenceOccurrence
impl UnsafeUnpin for SBOMReferenceOccurrence
impl UnwindSafe for SBOMReferenceOccurrence
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