pub struct LauncherCtx<'a> {Show 15 fields
pub home: &'a Path,
pub bin_dir: &'a Path,
pub running_exe: &'a Path,
pub host: Host,
pub probe: &'a dyn ProcessProbe,
pub now_ms: &'a dyn Fn() -> i64,
pub path_has: &'a dyn Fn(&str) -> bool,
pub opencode_bin: Option<&'a Path>,
pub version: &'a str,
pub parent_chain: &'a dyn Fn() -> Vec<String>,
pub server_password: Option<&'a str>,
pub spawn_detached: &'a dyn Fn(&mut Command) -> Result<u32>,
pub spawn_and_wait: &'a SpawnAndWaitFn<'a>,
pub before_claim: Option<&'a dyn Fn()>,
pub out: &'a mut dyn Write,
}Fields§
§home: &'a Path= engine.env.home; the launcher asserts equality.
bin_dir: &'a Path~/.local/bin or %LOCALAPPDATA%\opencode-ctl; tests pass a temp dir.
running_exe: &'a Path§host: Host§probe: &'a dyn ProcessProbe§now_ms: &'a dyn Fn() -> i64§path_has: &'a dyn Fn(&str) -> bool§opencode_bin: Option<&'a Path>The RESOLVED opencode binary for the wrapper; None = OPENCODE_NOT_FOUND for pair and attach.
version: &'a strThe front’s CARGO_PKG_VERSION: the version= line of opencode-pair.exe.source.
parent_chain: &'a dyn Fn() -> Vec<String>§server_password: Option<&'a str>OPENCODE_SERVER_PASSWORD at launch (empty = absent).
spawn_detached: &'a dyn Fn(&mut Command) -> Result<u32>The terminal tab: spawn and return the pid.
spawn_and_wait: &'a SpawnAndWaitFn<'a>The controller: calls the callback with the pid right after spawn, then waits.
before_claim: Option<&'a dyn Fn()>Test failpoint for attach: called after the record is read, before the first claim.
out: &'a mut dyn WriteAuto Trait Implementations§
impl<'a> !RefUnwindSafe for LauncherCtx<'a>
impl<'a> !Send for LauncherCtx<'a>
impl<'a> !Sync for LauncherCtx<'a>
impl<'a> !UnwindSafe for LauncherCtx<'a>
impl<'a> Freeze for LauncherCtx<'a>
impl<'a> Unpin for LauncherCtx<'a>
impl<'a> UnsafeUnpin for LauncherCtx<'a>
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