pub struct LaneGateBoard {
pub lane_id: String,
pub gates: BTreeMap<String, GateState>,
pub retries: BTreeMap<String, u32>,
pub artifacts: Vec<HandoffArtifact>,
}Expand description
In-memory (and serializable) gate + handoff store for one lane.
Fields§
§lane_id: String§gates: BTreeMap<String, GateState>Gate id → current state.
retries: BTreeMap<String, u32>Retry counters per gate id.
artifacts: Vec<HandoffArtifact>Handoff artifacts for this lane.
Implementations§
Source§impl LaneGateBoard
impl LaneGateBoard
pub fn new(lane_id: impl Into<String>) -> Self
Sourcepub fn install_gates(&mut self, specs: &[GateSpec])
pub fn install_gates(&mut self, specs: &[GateSpec])
Register gate specs in pending state.
Sourcepub fn evaluate(
&mut self,
spec: &GateSpec,
outcome: GateOutcome,
) -> Result<GateState, GateError>
pub fn evaluate( &mut self, spec: &GateSpec, outcome: GateOutcome, ) -> Result<GateState, GateError>
Evaluate a gate against an outcome; updates board state.
Sourcepub fn role_is_blocked(
&self,
specs: &[GateSpec],
role: &str,
) -> Option<&GateState>
pub fn role_is_blocked( &self, specs: &[GateSpec], role: &str, ) -> Option<&GateState>
Whether role is currently blocked by any gate that targets it.
Sourcepub fn record_handoff(
&mut self,
artifact: HandoffArtifact,
) -> Result<(), GateError>
pub fn record_handoff( &mut self, artifact: HandoffArtifact, ) -> Result<(), GateError>
Record a scout→implementer (etc.) handoff artifact.
Sourcepub fn latest_handoff(
&self,
from_role: &str,
to_role: &str,
kind: &str,
) -> Option<&HandoffArtifact>
pub fn latest_handoff( &self, from_role: &str, to_role: &str, kind: &str, ) -> Option<&HandoffArtifact>
Latest handoff of kind from from_role to to_role, if any.
Sourcepub fn save_to_dir(&self, dir: &Path) -> Result<PathBuf, GateError>
pub fn save_to_dir(&self, dir: &Path) -> Result<PathBuf, GateError>
Persist board under a lane directory (JSON).
pub fn load_from_dir(dir: &Path) -> Result<Self, GateError>
Sourcepub fn status_summary(&self) -> Vec<GateStatusLine>
pub fn status_summary(&self) -> Vec<GateStatusLine>
Compact status for lane status / panel surfaces.
Trait Implementations§
Source§impl Clone for LaneGateBoard
impl Clone for LaneGateBoard
Source§fn clone(&self) -> LaneGateBoard
fn clone(&self) -> LaneGateBoard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LaneGateBoard
impl Debug for LaneGateBoard
Source§impl Default for LaneGateBoard
impl Default for LaneGateBoard
Source§fn default() -> LaneGateBoard
fn default() -> LaneGateBoard
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LaneGateBoard
impl<'de> Deserialize<'de> for LaneGateBoard
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 Eq for LaneGateBoard
Source§impl PartialEq for LaneGateBoard
impl PartialEq for LaneGateBoard
Source§impl Serialize for LaneGateBoard
impl Serialize for LaneGateBoard
impl StructuralPartialEq for LaneGateBoard
Auto Trait Implementations§
impl Freeze for LaneGateBoard
impl RefUnwindSafe for LaneGateBoard
impl Send for LaneGateBoard
impl Sync for LaneGateBoard
impl Unpin for LaneGateBoard
impl UnsafeUnpin for LaneGateBoard
impl UnwindSafe for LaneGateBoard
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