pub struct TurnSteering { /* private fields */ }Expand description
Concurrency-safe ingress for messages sent while an in-process turn runs.
Closing and observing an empty queue is one atomic operation. A sender can therefore never be told that it steered a turn after that turn committed to completion; rejected input belongs to the next turn instead.
This type, AcceptedTurnInput, TurnSteeringPushError,
InProcessRuntime::run_steerable_turn and
InProcessRuntime::append_accepted_inputs form the steering surface the
separately published everruns facade drives. It was #[doc(hidden)]
while that was treated as internal plumbing, which is what let a signature
change ship under a host patch release and break the published facade
(everruns/yolop#665) – #[doc(hidden)] hides an item from rustdoc and from
cargo-semver-checks, but it does not make it private, and a contract
crossing a crates.io boundary is public whatever it is annotated with.
Change these together with a host minor bump and a facade release.
Implementations§
Source§impl TurnSteering
impl TurnSteering
pub fn new() -> Self
pub fn try_push( &self, input: AcceptedTurnInput, ) -> Result<(), TurnSteeringPushError>
pub fn close(&self)
pub fn close_and_drain(&self) -> Vec<AcceptedTurnInput>
Trait Implementations§
Source§impl Clone for TurnSteering
impl Clone for TurnSteering
Source§fn clone(&self) -> TurnSteering
fn clone(&self) -> TurnSteering
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more