Skip to main content

TurnActivityTrackerInner

Struct TurnActivityTrackerInner 

Source
struct TurnActivityTrackerInner {
Show 13 fields active_turn: bool, exit_code: Option<i32>, provenance: Option<TurnProvenance>, next_turn: Option<TurnProvenance>, ledger: Option<TurnLedger>, input_during_pass: bool, cli_wake_pending: bool, continuation_expected: bool, continuation_provenance: Option<TurnProvenance>, pending_join: Option<(u64, u64)>, ledger_seq: u64, next_turn_trigger: Option<TurnTrigger>, pending_task_trigger: Option<TurnTrigger>,
}

Fields§

§active_turn: bool§exit_code: Option<i32>§provenance: Option<TurnProvenance>

What started the CURRENT turn. Cleared on every idle→active flip that isn’t labelled, so a turn only ever carries a provenance its own start reported — a stale label can never leak into a later turn.

§next_turn: Option<TurnProvenance>

Told ahead of a turn that starts later — a message queued while the process spawns. Taken by the next idle→active flip.

§ledger: Option<TurnLedger>

The user-facing turn this block is in, or last was in.

§input_during_pass: bool

Input was written while the current pass ran: the CLI may answer it in a pass of its own straight after this one (J2).

§cli_wake_pending: bool

The CLI reported a finished background task, so it will start a pass by itself to tell the model (J4). Cleared when any pass starts.

§continuation_expected: bool

Input reached the CLI during the pass that just ended, which it may answer in a pass of its own straight after (J2). Good only while that turn settles: a later pass the CLI starts is something else’s.

§continuation_provenance: Option<TurnProvenance>

What started that pass: a continuation answers the same input, so it carries the same provenance (self-quit gate, §6.3).

§pending_join: Option<(u64, u64)>

The turn a held message being sent now should join, and when srv was told: for controllers whose pass starts carry no input (hint_join).

§ledger_seq: u64

The last TurnLedger::seq stamped, across turns.

§next_turn_trigger: Option<TurnTrigger>

The trigger of a message queued for the next turn (hint_next_turn).

§pending_task_trigger: Option<TurnTrigger>

The task the CLI last reported finished, for the pass it wakes for.

Implementations§

Source§

impl TurnActivityTrackerInner

Source

fn stamp(&mut self, before: &Option<TurnLedger>) -> Option<TurnLedger>

The ledger to publish after a change: stamped with the next seq when it differs from before.

Source

fn start_unlabelled(&mut self)

idle→active with no label: take the queued hint, if any.

Source

fn note_input_during_pass(&mut self, trigger: Option<TurnTrigger>)

Mid-pass input: the turn will expect a next pass when this one ends.

Source

fn begin_pass( &mut self, start: PassStart, trigger: Option<TurnTrigger>, now: u64, )

A pass starts (idle→active): join the current turn or open a new one (turn-model spec §4.3).

Source

fn end_pass(&mut self, now: u64, provenance: Option<TurnProvenance>)

The running pass ended (active→idle). The turn waits for a next pass when one is expected, and is over otherwise.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync> ⓘ

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more