pub struct WorkspaceConfig {
pub base: PathBuf,
pub mode: WorkspaceMode,
pub repo: Option<PathBuf>,
pub rev: Option<String>,
}Expand description
Configuration for per-agent workspace provisioning.
Fields§
§base: PathBufBase directory under which per-agent workspaces are created. For
GitWorktree this must be inside (or be) a git working tree, unless
repo names the repository explicitly.
mode: WorkspaceMode§repo: Option<PathBuf>For GitWorktree: the repository to check worktrees out of, when it
differs from base. None derives the repo from base (the original
behavior, where worktrees land inside the repo itself). Setting this
lets worktrees live outside the repository — e.g. under a state dir —
so they never show up as untracked entries in the user’s checkout.
rev: Option<String>For GitWorktree: the commit-ish to check the worktree out at. None
is the repository’s HEAD, the original behavior. Setting it lets a
session start from work that is not checked out — another developer’s
published branch, say — without touching the user’s checkout.
Implementations§
Source§impl WorkspaceConfig
impl WorkspaceConfig
pub fn directory(base: impl Into<PathBuf>) -> Self
pub fn git_worktree(base: impl Into<PathBuf>) -> Self
Trait Implementations§
Source§impl Clone for WorkspaceConfig
impl Clone for WorkspaceConfig
Auto Trait Implementations§
impl Freeze for WorkspaceConfig
impl RefUnwindSafe for WorkspaceConfig
impl Send for WorkspaceConfig
impl Sync for WorkspaceConfig
impl Unpin for WorkspaceConfig
impl UnsafeUnpin for WorkspaceConfig
impl UnwindSafe for WorkspaceConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
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> ⓘ
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