pub struct MetroLine {
pub id: String,
pub label: String,
pub stations: Vec<MetroStation>,
}Expand description
One metro line — a single test chain, button → … → warehouse.
Fields§
§id: StringStable id (the chain id, e.g. bench_run→Bench.Submit).
label: StringHuman label drawn at the head of the line.
stations: Vec<MetroStation>Stops in chain order: START first, TERMINUS last (by convention).
Implementations§
Source§impl MetroLine
impl MetroLine
pub fn new( id: impl Into<String>, label: impl Into<String>, stations: Vec<MetroStation>, ) -> Self
Sourcepub fn is_green(&self) -> bool
pub fn is_green(&self) -> bool
The green verdict. A line is green only when every gating station (Start / Emitter / Grpc / Terminus) is lit. Pass-throughs are ignored — they are ridden through, not lit, and never make a line red. A line with no gating stations is vacuously green.
Sourcepub fn unlit(&self) -> Vec<&MetroStation>
pub fn unlit(&self) -> Vec<&MetroStation>
The gating stations that are unlit — the reason a line is red. Empty
when is_green.
Sourcepub fn station_count(&self) -> usize
pub fn station_count(&self) -> usize
Count of full stations (everything but pass-through ticks).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for MetroLine
impl<'de> Deserialize<'de> for MetroLine
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 StructuralPartialEq for MetroLine
Auto Trait Implementations§
impl Freeze for MetroLine
impl RefUnwindSafe for MetroLine
impl Send for MetroLine
impl Sync for MetroLine
impl Unpin for MetroLine
impl UnsafeUnpin for MetroLine
impl UnwindSafe for MetroLine
Blanket Implementations§
impl<T> Allocation for T
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