pub struct NoopContext;Expand description
No-op context for browser (WASM) execution. All system-access methods return errors — browser has no shell.
Trait Implementations§
Source§impl ProcessContext for NoopContext
impl ProcessContext for NoopContext
Source§fn run_command(&self, _cmd: &str, _args: &[&str]) -> Result<Vec<u8>, BntoError>
fn run_command(&self, _cmd: &str, _args: &[&str]) -> Result<Vec<u8>, BntoError>
Run an external command, capturing stdout.
Source§fn temp_file(&self, _suffix: &str) -> Result<PathBuf, BntoError>
fn temp_file(&self, _suffix: &str) -> Result<PathBuf, BntoError>
Return a unique temporary file path with atomic creation (mkstemp).
The file IS pre-created on disk to prevent TOCTOU races.
Source§fn run_command_streaming(
&self,
cmd: &str,
args: &[&str],
on_output: &dyn Fn(&str),
) -> Result<Vec<u8>, BntoError>
fn run_command_streaming( &self, cmd: &str, args: &[&str], on_output: &dyn Fn(&str), ) -> Result<Vec<u8>, BntoError>
Run an external command, streaming output lines via a callback. Read more
Source§fn home_dir(&self) -> Option<&Path>
fn home_dir(&self) -> Option<&Path>
Get the bnto home directory (~/.bnto/ by default).
Returns
None in browser (WASM) — filesystem paths don’t apply.Source§fn output_dir(&self) -> Option<PathBuf>
fn output_dir(&self) -> Option<PathBuf>
Get the default output directory for recipe results (~/.bnto/output/).
Returns
None in browser (WASM) — filesystem paths don’t apply.Auto Trait Implementations§
impl Freeze for NoopContext
impl RefUnwindSafe for NoopContext
impl Send for NoopContext
impl Sync for NoopContext
impl Unpin for NoopContext
impl UnsafeUnpin for NoopContext
impl UnwindSafe for NoopContext
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