pub enum StateEvent {
FileVerdict {
path: String,
state: FileState,
},
BecameGreen {
identity: BuildIdentity,
},
BecameRed,
}Expand description
The event stream emitted by the daemon’s green/red model. Every other subsystem subscribes to this; nothing calls the model directly.
Two flavours, deliberately distinct:
FileVerdict— level: “this file is now X”. Idempotent; fine to re-emit the same state.BecameGreen/BecameRed— edges: the tree just crossed the green⇄red boundary. These are the latency-to-signal events the product is built around (“tells you the moment it doesn’t”):BecameRedis the instant the server must freeze on last-green;BecameGreenis the only thing that may trigger a build.
Variants§
FileVerdict
A single file’s verdict (re)settled. Level-triggered.
BecameGreen
The tree transitioned red → green. Carries the identity of the now-green input set so the build can be triggered without a second round-trip to the model. Edge-triggered: emitted once per crossing.
Fields
§
identity: BuildIdentityBecameRed
The tree transitioned green → red. The dev server must immediately stop advancing and keep serving the last green artifact. Edge-triggered.
Trait Implementations§
Source§impl Clone for StateEvent
impl Clone for StateEvent
Source§fn clone(&self) -> StateEvent
fn clone(&self) -> StateEvent
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 StateEvent
impl Debug for StateEvent
impl Eq for StateEvent
Source§impl PartialEq for StateEvent
impl PartialEq for StateEvent
impl StructuralPartialEq for StateEvent
Auto Trait Implementations§
impl Freeze for StateEvent
impl RefUnwindSafe for StateEvent
impl Send for StateEvent
impl Sync for StateEvent
impl Unpin for StateEvent
impl UnsafeUnpin for StateEvent
impl UnwindSafe for StateEvent
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