pub struct CommandSpec {
pub program: OsString,
pub args: Vec<OsString>,
pub cwd: Option<PathBuf>,
}Expand description
Fields§
§program: OsString可执行文件。宿主会用 which 解析成真实路径,并按平台决定要不要包一层
cmd /C(Windows 上 pnpm 是 pnpm.cmd,直接 spawn 会失败)。
args: Vec<OsString>参数,按顺序。
cwd: Option<PathBuf>工作目录覆盖。None = 用宿主给的项目根。
Implementations§
Source§impl CommandSpec
impl CommandSpec
Trait Implementations§
Source§impl Clone for CommandSpec
impl Clone for CommandSpec
Source§impl Debug for CommandSpec
impl Debug for CommandSpec
impl Eq for CommandSpec
Source§impl PartialEq for CommandSpec
impl PartialEq for CommandSpec
impl StructuralPartialEq for CommandSpec
Auto Trait Implementations§
impl Freeze for CommandSpec
impl RefUnwindSafe for CommandSpec
impl Send for CommandSpec
impl Sync for CommandSpec
impl Unpin for CommandSpec
impl UnsafeUnpin for CommandSpec
impl UnwindSafe for CommandSpec
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