pub enum JobStatus {
Created,
Pending,
Running,
Success,
Failed,
Canceled,
Skipped,
Manual,
Scheduled,
}Expand description
Status of a CI/CD job.
Represents the various states a GitLab job can be in during its lifecycle.
Variants§
Created
Job created but not yet running
Pending
Job is waiting to be picked up by a runner
Running
Job is currently running
Success
Job completed successfully
Failed
Job failed
Canceled
Job was canceled
Skipped
Job was skipped
Manual
Job is waiting for manual action
Scheduled
Job is scheduled to run
Implementations§
Source§impl JobStatus
impl JobStatus
Sourcepub fn is_finished(self) -> bool
pub fn is_finished(self) -> bool
Returns true if the job is in a terminal state (completed, won’t change).
§Examples
use lmrc_gitlab::models::JobStatus;
assert!(JobStatus::Success.is_finished());
assert!(JobStatus::Failed.is_finished());
assert!(!JobStatus::Running.is_finished());Sourcepub fn is_active(self) -> bool
pub fn is_active(self) -> bool
Returns true if the job is currently active (running or pending).
§Examples
use lmrc_gitlab::models::JobStatus;
assert!(JobStatus::Running.is_active());
assert!(JobStatus::Pending.is_active());
assert!(!JobStatus::Success.is_active());Sourcepub fn is_successful(self) -> bool
pub fn is_successful(self) -> bool
Returns true if the job succeeded.
§Examples
use lmrc_gitlab::models::JobStatus;
assert!(JobStatus::Success.is_successful());
assert!(!JobStatus::Failed.is_successful());Trait Implementations§
Source§impl<'de> Deserialize<'de> for JobStatus
impl<'de> Deserialize<'de> for JobStatus
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 Copy for JobStatus
impl Eq for JobStatus
impl StructuralPartialEq for JobStatus
Auto Trait Implementations§
impl Freeze for JobStatus
impl RefUnwindSafe for JobStatus
impl Send for JobStatus
impl Sync for JobStatus
impl Unpin for JobStatus
impl UnwindSafe for JobStatus
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> 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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.