Skip to main content

gitbundle_sdk/models/
status_context.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.4.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(
16    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
17)]
18pub enum StatusContext {
19    #[serde(rename = "noop")]
20    #[default]
21    Noop,
22    #[serde(rename = "success")]
23    Success,
24    #[serde(rename = "failure")]
25    Failure,
26    #[serde(rename = "cancelled")]
27    Cancelled,
28    #[serde(rename = "skipped")]
29    Skipped,
30}
31
32impl std::fmt::Display for StatusContext {
33    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
34        match self {
35            Self::Noop => write!(f, "noop"),
36            Self::Success => write!(f, "success"),
37            Self::Failure => write!(f, "failure"),
38            Self::Cancelled => write!(f, "cancelled"),
39            Self::Skipped => write!(f, "skipped"),
40        }
41    }
42}