Skip to main content

SopDriverRegistry

Struct SopDriverRegistry 

pub struct SopDriverRegistry { /* private fields */ }
Expand description

Spawn a background task that drives a resumed SOP action to its next blocking or terminal state. Gate-clearing surfaces without an ambient agent turn (HTTP decide, WS approvals, manual dashboard runs) land here: ExecuteStep runs through a fresh agent loop under the step’s resolved agent, DeterministicStep routes through the engine’s headless deterministic driver, and every other action is already parked or terminal.

Returns the driver’s task handle. A caller whose config and engine belong to a bounded lifetime (the daemon’s SOP maintenance tick, which is rebuilt on reload) must keep it and drain or cancel the driver when that lifetime ends; otherwise the driver keeps running against superseded configuration. Callers with no such boundary drop it to detach. A daemon generation’s set of headless driver handles, plus whether that generation has finalized it.

Registration and finalization race by construction: an approval can resolve on a connection task whose listener has already stopped accepting, so a driver can be produced after the drain has taken the set. A bare vector accepts that handle into a collection nobody drains again, and the driver runs on under superseded config and permissions — the exact escape the generation boundary exists to prevent. Closing the set makes the late registration fail instead.

Implementations§

Source§

impl SopDriverRegistry

Source

pub fn len(&self) -> usize

Handles this generation currently tracks.

Source

pub fn is_empty(&self) -> bool

Whether this generation currently tracks no drivers.

Source

pub fn is_closed(&self) -> bool

Whether the owning generation has finalized this set.

Source

pub fn close_and_take(&mut self) -> Vec<JoinHandle<()>>

Take every tracked handle and close the set. Taking and closing are one operation deliberately: a caller that took the handles without closing would leave later registrations landing in a set it no longer drains.

Source

pub fn close_and_take_owned(&mut self) -> Vec<RegisteredSopDriver>

Self::close_and_take, keeping each driver’s run. The teardown that may have to abort a driver uses this, so it can settle the run the aborted driver will never advance.

Trait Implementations§

Source§

impl Debug for SopDriverRegistry

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for SopDriverRegistry

Source§

fn default() -> SopDriverRegistry

Returns the “default value” for a type. Read more

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
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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