pub struct GenericSignedAttestation {
pub content_type: i32,
pub serialized_payload: Bytes,
pub signatures: Vec<Signature>,
}
Expand description
An attestation wrapper that uses the Grafeas Signature
message.
This attestation must define the serialized_payload
that the signatures
verify and any metadata necessary to interpret that plaintext. The
signatures should always be over the serialized_payload
bytestring.
Fields§
§content_type: i32
Type (for example schema) of the attestation payload that was signed. The verifier must ensure that the provided type is one that the verifier supports, and that the attestation payload is a valid instantiation of that type (for example by validating a JSON schema).
serialized_payload: Bytes
The serialized payload that is verified by one or more signatures
.
The encoding and semantic meaning of this payload must match what is set in
content_type
.
signatures: Vec<Signature>
One or more signatures over serialized_payload
. Verifier implementations
should consider this attestation message verified if at least one
signature
verifies serialized_payload
. See Signature
in common.proto
for more details on signature structure and verification.
Implementations§
source§impl GenericSignedAttestation
impl GenericSignedAttestation
sourcepub fn content_type(&self) -> ContentType
pub fn content_type(&self) -> ContentType
Returns the enum value of content_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_content_type(&mut self, value: ContentType)
pub fn set_content_type(&mut self, value: ContentType)
Sets content_type
to the provided enum value.
Trait Implementations§
source§impl Clone for GenericSignedAttestation
impl Clone for GenericSignedAttestation
source§fn clone(&self) -> GenericSignedAttestation
fn clone(&self) -> GenericSignedAttestation
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for GenericSignedAttestation
impl Debug for GenericSignedAttestation
source§impl Default for GenericSignedAttestation
impl Default for GenericSignedAttestation
source§impl Message for GenericSignedAttestation
impl Message for GenericSignedAttestation
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for GenericSignedAttestation
impl PartialEq for GenericSignedAttestation
source§fn eq(&self, other: &GenericSignedAttestation) -> bool
fn eq(&self, other: &GenericSignedAttestation) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for GenericSignedAttestation
Auto Trait Implementations§
impl !Freeze for GenericSignedAttestation
impl RefUnwindSafe for GenericSignedAttestation
impl Send for GenericSignedAttestation
impl Sync for GenericSignedAttestation
impl Unpin for GenericSignedAttestation
impl UnwindSafe for GenericSignedAttestation
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request