pub enum JobState {
Created,
Queued,
Running,
Cancelling,
Succeeded,
Failed,
Cancelled,
Cleaning,
Cleaned,
CleanupFailed,
}Expand description
Lifecycle state of one provider job.
Variants§
Created
Provider accepted the request and allocated an identifier.
Queued
Job awaits a worker.
Running
Worker is preparing or building the project.
Cancelling
Cancellation was accepted and cleanup is pending.
Succeeded
Build completed successfully.
Failed
Build failed.
Cancelled
Build stopped after cancellation.
Cleaning
Provider is deleting remote job material.
Cleaned
Required cleanup completed.
CleanupFailed
Cleanup was attempted but did not complete.
Implementations§
Source§impl JobState
impl JobState
Sourcepub const fn can_transition_to(self, next: Self) -> bool
pub const fn can_transition_to(self, next: Self) -> bool
Whether a direct state transition is valid.
Sourcepub fn transition_to(self, next: Self) -> RemoteBuildResult<Self>
pub fn transition_to(self, next: Self) -> RemoteBuildResult<Self>
Apply a checked state transition.
§Errors
Returns RemoteBuildError::InvalidJobTransition for a forbidden transition.
Sourcepub const fn is_build_terminal(self) -> bool
pub const fn is_build_terminal(self) -> bool
Whether the build phase has completed, before optional cleanup.
Sourcepub const fn is_terminal(self) -> bool
pub const fn is_terminal(self) -> bool
Whether no further lifecycle transition is possible.
Trait Implementations§
impl Copy for JobState
Source§impl<'de> Deserialize<'de> for JobState
impl<'de> Deserialize<'de> for JobState
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 JobState
Source§impl JsonSchema for JobState
impl JsonSchema for JobState
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 Ord for JobState
impl Ord for JobState
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for JobState
impl PartialOrd for JobState
impl StructuralPartialEq for JobState
Auto Trait Implementations§
impl Freeze for JobState
impl RefUnwindSafe for JobState
impl Send for JobState
impl Sync for JobState
impl Unpin for JobState
impl UnsafeUnpin for JobState
impl UnwindSafe for JobState
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,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.