pub(crate) enum CronFireOutcome {
Delivered,
TargetGone,
TargetCannotBeWoken {
directory: PathBuf,
},
DeferredCooling {
cooling: ProjectCooling,
},
DispatchFailed,
SkippedAsleep,
}Expand description
Outcome of a cron fire’s delivery, so fire_due_crons can decide the
entry’s fate rather than treating every hand-off as a success.
Variants§
Delivered
Dispatched into a running session, or buffered + a spawn kicked off. The caller advances/removes the cron as normal.
TargetGone
The cron’s project is no longer in forge.toml. The caller removes the entry instead of advancing a dead cron forever.
TargetCannotBeWoken
The owner still has a row, but the boot wave would skip it, so
nothing can drain a prompt buffered for it and the prompt cannot
reach anyone. directory is where its session would have started,
for the warning. Distinct from Self::TargetGone because the
row is kept: a restored worktree brings the owner back.
The caller’s fate for the entry splits on the kind. A recurring cron drops this fire and advances - leaving it due would re-fire every tick, and parking it would grow a bucket nothing drains. A one-shot stays due instead, because advancing removes a one-shot: dropping it would throw the prompt away with no later slot.
DeferredCooling
Every account serving the project’s model is cooling until the carried reset: the caller leaves the entry due, because a refusal right now would expire the parked prompt.
Fields
cooling: ProjectCoolingDispatchFailed
The Command channel is closed (workspace shutting down). The caller leaves the cron due so the next boot catch-up re-fires it.
SkippedAsleep
The owner is asleep and this cron may not wake it (wake: false).
The caller leaves the entry due without advancing, so the next
session start (or a tick while the owner is awake) delivers it.
Auto Trait Implementations§
impl Freeze for CronFireOutcome
impl RefUnwindSafe for CronFireOutcome
impl Send for CronFireOutcome
impl Sync for CronFireOutcome
impl Unpin for CronFireOutcome
impl UnsafeUnpin for CronFireOutcome
impl UnwindSafe for CronFireOutcome
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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