pub struct SnapshotArtifactReceipt {
pub schema_version: u32,
pub protocol_version: ProtocolVersion,
pub operation_id: String,
pub job_id: String,
pub artifact_id: String,
pub size: u64,
pub sha256: String,
pub local_path: ProtocolPath,
}Expand description
Client acknowledgement after exact artifact bytes are safely verified.
Fields§
§schema_version: u32Snapshot-session message schema.
protocol_version: ProtocolVersionNegotiated Ferry Remote Build Protocol version.
operation_id: StringOperation identifier from the submitted request.
job_id: StringProvider-owned job identifier.
artifact_id: StringExact artifact identifier.
size: u64Verified local byte length.
sha256: StringVerified local lowercase SHA-256.
local_path: ProtocolPathAbsolute create-only client destination containing the verified bytes.
Implementations§
Source§impl SnapshotArtifactReceipt
impl SnapshotArtifactReceipt
Sourcepub fn new(
descriptor: &SnapshotArtifactDescriptor,
local_path: ProtocolPath,
) -> RemoteBuildResult<Self>
pub fn new( descriptor: &SnapshotArtifactDescriptor, local_path: ProtocolPath, ) -> RemoteBuildResult<Self>
Construct a receipt from a validated descriptor and client path.
§Errors
Rejects invalid descriptor evidence or a non-client-absolute destination.
Sourcepub fn validate_for(
&self,
descriptor: &SnapshotArtifactDescriptor,
) -> RemoteBuildResult<()>
pub fn validate_for( &self, descriptor: &SnapshotArtifactDescriptor, ) -> RemoteBuildResult<()>
Validate the receipt against the exact offered artifact.
§Errors
Rejects identity, size, digest, or path mismatches.
Trait Implementations§
Source§impl Clone for SnapshotArtifactReceipt
impl Clone for SnapshotArtifactReceipt
Source§impl Debug for SnapshotArtifactReceipt
impl Debug for SnapshotArtifactReceipt
Source§impl<'de> Deserialize<'de> for SnapshotArtifactReceipt
impl<'de> Deserialize<'de> for SnapshotArtifactReceipt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SnapshotArtifactReceipt
Source§impl JsonSchema for SnapshotArtifactReceipt
impl JsonSchema for SnapshotArtifactReceipt
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SnapshotArtifactReceipt
impl PartialEq for SnapshotArtifactReceipt
Source§impl Serialize for SnapshotArtifactReceipt
impl Serialize for SnapshotArtifactReceipt
impl StructuralPartialEq for SnapshotArtifactReceipt
Auto Trait Implementations§
impl Freeze for SnapshotArtifactReceipt
impl RefUnwindSafe for SnapshotArtifactReceipt
impl Send for SnapshotArtifactReceipt
impl Sync for SnapshotArtifactReceipt
impl Unpin for SnapshotArtifactReceipt
impl UnsafeUnpin for SnapshotArtifactReceipt
impl UnwindSafe for SnapshotArtifactReceipt
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.