pub struct WorktreeSandbox {
pub source: PathBuf,
pub branch: String,
pub start_ref: Option<String>,
pub target: Option<PathBuf>,
}Expand description
Spawn a fresh git worktree at a sibling path on a new branch.
Requires git on PATH. The host repo must be a git repository.
Fields§
§source: PathBufPath to the source git repo.
branch: StringBranch name to create (must not already exist).
start_ref: Option<String>Optional starting ref; defaults to the current HEAD.
target: Option<PathBuf>Optional explicit worktree path (default: tempdir).
Implementations§
Trait Implementations§
Source§impl Sandbox for WorktreeSandbox
impl Sandbox for WorktreeSandbox
fn fs_policy(&self) -> FsPolicy
fn net_policy(&self) -> NetPolicy
Source§fn isolation(&self) -> Isolation
fn isolation(&self) -> Isolation
What this backend actually enforces (be honest — see
Isolation).fn spawn<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SandboxHandle, SandboxError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Forget for WorktreeSandbox
impl Freeze for WorktreeSandbox
impl RefUnwindSafe for WorktreeSandbox
impl Send for WorktreeSandbox
impl Sync for WorktreeSandbox
impl Unpin for WorktreeSandbox
impl UnsafeUnpin for WorktreeSandbox
impl UnwindSafe for WorktreeSandbox
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