pub struct SnapshotJobAccepted {
pub schema_version: u32,
pub protocol_version: ProtocolVersion,
pub operation_id: String,
pub job_id: String,
pub state: JobState,
pub created_at_ms: u64,
}Expand description
Worker acknowledgement after allocating one snapshot job.
Fields§
§schema_version: u32Snapshot-session message schema.
protocol_version: ProtocolVersionNegotiated Ferry Remote Build Protocol version.
operation_id: StringOperation identifier copied from the build start.
job_id: StringProvider-owned job identifier.
state: JobStateInitial state; always created.
created_at_ms: u64Milliseconds since Unix epoch in UTC.
Implementations§
Source§impl SnapshotJobAccepted
impl SnapshotJobAccepted
Sourcepub fn new(
operation_id: impl Into<String>,
job_id: impl Into<String>,
created_at_ms: u64,
) -> RemoteBuildResult<Self>
pub fn new( operation_id: impl Into<String>, job_id: impl Into<String>, created_at_ms: u64, ) -> RemoteBuildResult<Self>
Sourcepub fn validate(&self) -> RemoteBuildResult<()>
pub fn validate(&self) -> RemoteBuildResult<()>
Validate schema, protocol, identity, and initial-state invariants.
§Errors
Rejects unsupported versions, unsafe identifiers, or a non-created state.
Sourcepub fn job_handle(&self) -> JobHandle
pub fn job_handle(&self) -> JobHandle
Convert the acknowledgement into the provider-neutral job handle.
Trait Implementations§
Source§impl Clone for SnapshotJobAccepted
impl Clone for SnapshotJobAccepted
Source§impl Debug for SnapshotJobAccepted
impl Debug for SnapshotJobAccepted
Source§impl<'de> Deserialize<'de> for SnapshotJobAccepted
impl<'de> Deserialize<'de> for SnapshotJobAccepted
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 SnapshotJobAccepted
Source§impl JsonSchema for SnapshotJobAccepted
impl JsonSchema for SnapshotJobAccepted
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 SnapshotJobAccepted
impl PartialEq for SnapshotJobAccepted
Source§impl Serialize for SnapshotJobAccepted
impl Serialize for SnapshotJobAccepted
impl StructuralPartialEq for SnapshotJobAccepted
Auto Trait Implementations§
impl Freeze for SnapshotJobAccepted
impl RefUnwindSafe for SnapshotJobAccepted
impl Send for SnapshotJobAccepted
impl Sync for SnapshotJobAccepted
impl Unpin for SnapshotJobAccepted
impl UnsafeUnpin for SnapshotJobAccepted
impl UnwindSafe for SnapshotJobAccepted
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.