pub enum Status {
Success,
Failure,
Cancelled,
Skipped,
Pending,
}Expand description
The outcome of a CI job or step.
§Examples
use helpers4::ci::Status;
assert_eq!(Status::from_conclusion("failure"), Some(Status::Failure));
assert_eq!(Status::Success.icon(), "\u{2705}");
assert_eq!(Status::Success.label(), "success");Variants§
Success
Finished without errors.
Failure
Finished with an error, or timed out.
Cancelled
Stopped before it finished.
Skipped
Not run.
Pending
Queued or still running.
Implementations§
Source§impl Status
impl Status
Sourcepub fn from_conclusion(conclusion: &str) -> Option<Self>
pub fn from_conclusion(conclusion: &str) -> Option<Self>
Reads the conclusion names CI services use, ignoring case.
success, passed and pass are Status::Success; failure, failed, error and
timed_out are Status::Failure; cancelled and canceled are Status::Cancelled;
skipped is Status::Skipped; pending, queued, in_progress and running are
Status::Pending.
§Arguments
conclusion- The name, such as"success"or"cancelled".
§Returns
The status, or None for a name that is not one of those.
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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