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§
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more