pub struct DeclaredCommandExecutor { /* private fields */ }Expand description
Executes a declared body at the server: the process-group-contained
command, its transcript, its cancel-path registration, and the bound the
dispatch authored. Owns no routing decision — a caller has already looked
the body up — so it is the ONE implementation both the direct dispatch
decorator above and the outbox row decorator
(super::declared_body_outbox) run, and the two paths cannot execute a
body differently.
Implementations§
Source§impl DeclaredCommandExecutor
impl DeclaredCommandExecutor
Sourcepub fn new(
attempts: DeclaredCommandAttempts,
tokio: Handle,
workspace_root: WorkspaceRoot,
transcript: ActivityEventPublisher,
) -> Self
pub fn new( attempts: DeclaredCommandAttempts, tokio: Handle, workspace_root: WorkspaceRoot, transcript: ActivityEventPublisher, ) -> Self
Build an executor: registering every attempt it executes in attempts
so the run’s cancel can reach it, expanding {workspace_root} with the
server-resolved workspace_root, and streaming each executed command’s
output onto transcript.
Sourcepub fn execute(
&self,
request: &ActivityDispatch,
contract: &ActionBodyContract,
) -> Result<String, String>
pub fn execute( &self, request: &ActivityDispatch, contract: &ActionBodyContract, ) -> Result<String, String>
Run the body contract declares for request and encode how the
attempt ended onto the FFI string contract — the same string the
direct path returns to the engine, produced by the same code.
§Errors
The prefixed failure string (terminal: / retryable: /
policy_refused: / timeout:), or the parked-activity sentinel when
this server is draining and starts no new work.
Auto Trait Implementations§
impl !RefUnwindSafe for DeclaredCommandExecutor
impl !UnwindSafe for DeclaredCommandExecutor
impl Freeze for DeclaredCommandExecutor
impl Send for DeclaredCommandExecutor
impl Sync for DeclaredCommandExecutor
impl Unpin for DeclaredCommandExecutor
impl UnsafeUnpin for DeclaredCommandExecutor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request