pub struct ProcessWorkDriver { /* private fields */ }Expand description
Registry and run handle for process work owned outside
LashCore.
The registry non-terminal rows are the durable work queue. Hosts drive that
queue explicitly by calling claim_and_run_pending
on each relevant event. Cross-process idempotency belongs to the registry
claim; there is no core-owned polling loop.
Implementations§
Source§impl ProcessWorkDriver
impl ProcessWorkDriver
pub fn new( registry: Arc<dyn ProcessRegistry>, run_handle: Arc<dyn ProcessRunHandle>, ) -> ProcessWorkDriver
Sourcepub fn new_with_sink(
registry: Arc<dyn ProcessRegistry>,
run_handle: Arc<dyn ProcessRunHandle>,
sink: Option<Arc<dyn ProcessEventSink>>,
) -> ProcessWorkDriver
pub fn new_with_sink( registry: Arc<dyn ProcessRegistry>, run_handle: Arc<dyn ProcessRunHandle>, sink: Option<Arc<dyn ProcessEventSink>>, ) -> ProcessWorkDriver
Like new, but installs a host-facing
ProcessEventSink on the registry decorator this driver wraps.
The sink receives every appended event, best-effort, after its durable
write — see ProcessEventSink for the freshness-not-truth contract.
pub fn from_watched( registry: Arc<dyn ProcessRegistry>, hub: ProcessChangeHub, run_handle: Arc<dyn ProcessRunHandle>, ) -> ProcessWorkDriver
pub fn with_attach(self, attach: Arc<dyn ProcessAttach>) -> ProcessWorkDriver
pub fn inline( registry: Arc<dyn ProcessRegistry>, worker: DurableProcessWorker, ) -> ProcessWorkDriver
pub fn process_registry(&self) -> Arc<dyn ProcessRegistry> ⓘ
pub fn change_hub(&self) -> ProcessChangeHub
pub fn awaiter(&self) -> ProcessAwaiter
pub async fn await_terminal( &self, process_id: &str, ) -> Result<ProcessAwaitOutput, PluginError>
pub async fn await_event( &self, process_id: &str, event_type: &str, after_sequence: u64, ) -> Result<ProcessEvent, PluginError>
pub async fn claim_and_run_pending( &self, reason: &str, ) -> Result<(), PluginError>
Trait Implementations§
Source§impl Clone for ProcessWorkDriver
impl Clone for ProcessWorkDriver
Source§fn clone(&self) -> ProcessWorkDriver
fn clone(&self) -> ProcessWorkDriver
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for ProcessWorkDriver
impl !UnwindSafe for ProcessWorkDriver
impl Freeze for ProcessWorkDriver
impl Send for ProcessWorkDriver
impl Sync for ProcessWorkDriver
impl Unpin for ProcessWorkDriver
impl UnsafeUnpin for ProcessWorkDriver
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