pub struct GateItem {
pub id: String,
pub status: Verdict,
pub threshold: Option<f64>,
pub actual: Option<f64>,
pub reason: Option<String>,
pub source: Option<String>,
pub artifact_path: Option<String>,
}Expand description
Individual gate item in the gates section.
Fields§
§id: StringGate identifier (e.g., “mutation”, “diff_coverage”).
status: VerdictGate status.
threshold: Option<f64>Threshold value (if applicable).
actual: Option<f64>Actual measured value (if applicable).
reason: Option<String>Reason for the status (especially for pending/fail).
source: Option<String>Data source (e.g., “ci_artifact”, “computed”).
artifact_path: Option<String>Path to the source artifact (if applicable).
Implementations§
Source§impl GateItem
impl GateItem
Sourcepub fn new(id: impl Into<String>, status: Verdict) -> GateItem
pub fn new(id: impl Into<String>, status: Verdict) -> GateItem
Create a new gate item with required fields.
Sourcepub fn with_threshold(self, threshold: f64, actual: f64) -> GateItem
pub fn with_threshold(self, threshold: f64, actual: f64) -> GateItem
Create a gate item with pass/fail based on threshold comparison.
Sourcepub fn with_reason(self, reason: impl Into<String>) -> GateItem
pub fn with_reason(self, reason: impl Into<String>) -> GateItem
Add a reason to the gate item.
Sourcepub fn with_source(self, source: impl Into<String>) -> GateItem
pub fn with_source(self, source: impl Into<String>) -> GateItem
Add a source to the gate item.
Sourcepub fn with_artifact_path(self, path: impl Into<String>) -> GateItem
pub fn with_artifact_path(self, path: impl Into<String>) -> GateItem
Add an artifact path to the gate item.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for GateItem
impl<'de> Deserialize<'de> for GateItem
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<GateItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<GateItem, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for GateItem
impl Serialize for GateItem
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for GateItem
impl RefUnwindSafe for GateItem
impl Send for GateItem
impl Sync for GateItem
impl Unpin for GateItem
impl UnsafeUnpin for GateItem
impl UnwindSafe for GateItem
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