pub struct NativeTsRuntime { /* private fields */ }Expand description
Runtime that compiles TypeScript to a native executable and speaks JSON over stdin/stdout with that executable.
Implementations§
Source§impl NativeTsRuntime
impl NativeTsRuntime
Sourcepub const DEFAULT_MAX_STDOUT_BYTES: usize
pub const DEFAULT_MAX_STDOUT_BYTES: usize
Default maximum bytes retained from a compiler or runtime stdout pipe.
Sourcepub const DEFAULT_MAX_STDERR_BYTES: usize
pub const DEFAULT_MAX_STDERR_BYTES: usize
Default maximum bytes retained from a compiler or runtime stderr pipe.
pub fn new(config: NativeTsRuntimeConfig) -> Self
pub fn config(&self) -> &NativeTsRuntimeConfig
Sourcepub fn with_output_limits(
self,
max_stdout_bytes: usize,
max_stderr_bytes: usize,
) -> Self
pub fn with_output_limits( self, max_stdout_bytes: usize, max_stderr_bytes: usize, ) -> Self
Override the independent byte limits for each compiler and runtime stdout/stderr pipe.
Exceeding either limit terminates the direct child process and returns a runtime error. A zero limit allows an empty pipe but rejects its first byte of output.
Sourcepub fn max_stdout_bytes(&self) -> usize
pub fn max_stdout_bytes(&self) -> usize
Return the configured byte limit for each stdout pipe.
Sourcepub fn max_stderr_bytes(&self) -> usize
pub fn max_stderr_bytes(&self) -> usize
Return the configured byte limit for each stderr pipe.
pub async fn preflight( &self, spec: &WorkflowSpec, ) -> Result<NativeTsRuntimePreflight>
Trait Implementations§
Source§impl Clone for NativeTsRuntime
impl Clone for NativeTsRuntime
Source§fn clone(&self) -> NativeTsRuntime
fn clone(&self) -> NativeTsRuntime
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 moreSource§impl Debug for NativeTsRuntime
impl Debug for NativeTsRuntime
Source§impl FlowRuntime for NativeTsRuntime
impl FlowRuntime for NativeTsRuntime
Source§fn run_workflow<'life0, 'async_trait>(
&'life0 self,
invocation: WorkflowInvocation,
) -> Pin<Box<dyn Future<Output = Result<RuntimeCommand>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run_workflow<'life0, 'async_trait>(
&'life0 self,
invocation: WorkflowInvocation,
) -> Pin<Box<dyn Future<Output = Result<RuntimeCommand>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replay the deterministic workflow function and return the next command.
Auto Trait Implementations§
impl Freeze for NativeTsRuntime
impl RefUnwindSafe for NativeTsRuntime
impl Send for NativeTsRuntime
impl Sync for NativeTsRuntime
impl Unpin for NativeTsRuntime
impl UnsafeUnpin for NativeTsRuntime
impl UnwindSafe for NativeTsRuntime
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