pub struct NativeRuntime { /* private fields */ }Expand description
Native runtime — full access, runs on Mac/Linux/Docker/Raspberry Pi
Implementations§
Source§impl NativeRuntime
impl NativeRuntime
Sourcepub fn build_shell_command(command: &str) -> Command
pub fn build_shell_command(command: &str) -> Command
Builds the platform shell command used to execute a command string.
Sourcepub fn new(workspace: PathBuf) -> Self
pub fn new(workspace: PathBuf) -> Self
Creates a native runtime whose default working directory is workspace.
Request metadata can select a directory inside this root, but cannot add a new root. A host that has independently authorized another directory can construct a separate runtime for that call. This only controls the command’s initial working directory: native commands are not sandboxed.
Sourcepub fn temp_dir(self, temp_dir: PathBuf) -> Self
pub fn temp_dir(self, temp_dir: PathBuf) -> Self
Overrides the temporary directory used for raw output files.
Sourcepub fn background_progress_interval(self, interval: Duration) -> Self
pub fn background_progress_interval(self, interval: Duration) -> Self
Sets how often background command progress is emitted.
Sourcepub fn auto_background_after(self, interval: Duration) -> Self
pub fn auto_background_after(self, interval: Duration) -> Self
Sets the foreground duration after which a command moves to background mode.
Trait Implementations§
Source§impl Executor for NativeRuntime
impl Executor for NativeRuntime
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
ctx: BaseCtx,
input: ExecArgs,
envs: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<ExecOutput, BoxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
ctx: BaseCtx,
input: ExecArgs,
envs: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<ExecOutput, BoxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a shell command in this runtime environment, returning the output.
Auto Trait Implementations§
impl Freeze for NativeRuntime
impl RefUnwindSafe for NativeRuntime
impl Send for NativeRuntime
impl Sync for NativeRuntime
impl Unpin for NativeRuntime
impl UnsafeUnpin for NativeRuntime
impl UnwindSafe for NativeRuntime
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> Fruit for T
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> 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> ⓘ
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 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> ⓘ
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