pub struct WorkspaceServicesBuilder { /* private fields */ }Expand description
Builder for assembling workspace services without constructor arity churn.
Implementations§
Source§impl WorkspaceServicesBuilder
impl WorkspaceServicesBuilder
pub fn new( workspace_ref: WorkspaceRef, file_system: Arc<dyn WorkspaceFileSystem>, ) -> Self
pub fn capabilities(self, capabilities: WorkspaceCapabilities) -> Self
pub fn command_runner( self, command_runner: Arc<dyn WorkspaceCommandRunner>, ) -> Self
pub fn search(self, search: Arc<dyn WorkspaceSearch>) -> Self
pub fn git(self, git: Arc<dyn WorkspaceGit>) -> Self
pub fn git_stash(self, git_stash: Arc<dyn WorkspaceGitStashProvider>) -> Self
pub fn git_worktree( self, git_worktree: Arc<dyn WorkspaceGitWorktreeProvider>, ) -> Self
Sourcepub fn file_system_ext(self, ext: Arc<dyn WorkspaceFileSystemExt>) -> Self
pub fn file_system_ext(self, ext: Arc<dyn WorkspaceFileSystemExt>) -> Self
Attach optional compare-and-swap file system extensions
(WorkspaceFileSystemExt). Tools that perform read-modify-write
cycles will pick this up via WorkspaceServices::read_for_edit
and WorkspaceServices::write_for_edit.
Sourcepub fn operation_timeout(self, timeout: Duration) -> Self
pub fn operation_timeout(self, timeout: Duration) -> Self
Apply a default timeout to non-bash workspace operations (file system, search, git). Backends that may stall — remote, browser, DFS — should set this so tools surface a timeout error rather than hanging.
pub fn build(self) -> Arc<WorkspaceServices> ⓘ
Auto Trait Implementations§
impl Freeze for WorkspaceServicesBuilder
impl !RefUnwindSafe for WorkspaceServicesBuilder
impl Send for WorkspaceServicesBuilder
impl Sync for WorkspaceServicesBuilder
impl Unpin for WorkspaceServicesBuilder
impl UnsafeUnpin for WorkspaceServicesBuilder
impl !UnwindSafe for WorkspaceServicesBuilder
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
Converts
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>
Converts
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