pub struct ManifestWorkspaceBackend { /* private fields */ }Expand description
Local backend that uses an in-memory manifest for search.
Implementations§
Source§impl ManifestWorkspaceBackend
impl ManifestWorkspaceBackend
pub fn new(root: impl Into<PathBuf>) -> Arc<Self> ⓘ
pub fn new_with_access_policy( root: impl Into<PathBuf>, access_policy: LocalWorkspaceAccessPolicy, ) -> Arc<Self> ⓘ
Sourcepub fn new_deferred(root: impl Into<PathBuf>) -> Arc<Self> ⓘ
pub fn new_deferred(root: impl Into<PathBuf>) -> Arc<Self> ⓘ
Create a manifest-backed local workspace whose initial discovery is
explicitly activated through LocalWorkspaceManifest::activate.
Sourcepub fn new_deferred_with_access_policy(
root: impl Into<PathBuf>,
access_policy: LocalWorkspaceAccessPolicy,
) -> Arc<Self> ⓘ
pub fn new_deferred_with_access_policy( root: impl Into<PathBuf>, access_policy: LocalWorkspaceAccessPolicy, ) -> Arc<Self> ⓘ
Create a policy-constrained manifest backend without starting its scanner or platform watcher until the manifest is activated.
pub fn from_manifest( local: Arc<LocalWorkspaceBackend>, manifest: Arc<LocalWorkspaceManifest>, ) -> Arc<Self> ⓘ
Sourcepub fn configure_grep_candidate_index(
&self,
index: SharedGrepCandidateIndex,
) -> Result<(), String>
pub fn configure_grep_candidate_index( &self, index: SharedGrepCandidateIndex, ) -> Result<(), String>
Attach an optional content-level grep candidate index.
The index only prunes which files the exact regex scanner opens. Hosts
that omit this keep today’s full-scan-within-manifest behavior, or the
automatic trigram index when the grep-trigram feature is enabled.
pub fn grep_candidate_index(&self) -> Option<SharedGrepCandidateIndex>
pub fn manifest(&self) -> Arc<LocalWorkspaceManifest> ⓘ
Sourcepub fn chunk_catalog(&self) -> Arc<WorkspaceChunkCatalog> ⓘ
pub fn chunk_catalog(&self) -> Arc<WorkspaceChunkCatalog> ⓘ
Enable and return a session-local catalog built from the shared manifest.
Catalog reads always use the source-egress boundary independently from
the access policy selected for ordinary workspace tools. Unless
Self::configure_chunk_catalog ran first, this enables the compatible
default catalog configuration.
First principles: enabling the catalog must not open durable native FTS.
Wire that projection with Self::configure_persistent_index before
the catalog starts, or open it on BM25 demand via
Self::ensure_persistent_index. Grep never opens durable zvec. Missing
durable cache degrades to the portable in-memory catalog without failing
the workspace.
Sourcepub fn configure_persistent_index(
&self,
root: impl Into<PathBuf>,
) -> Result<Arc<WorkspacePersistentIndex>, WorkspaceIndexError>
pub fn configure_persistent_index( &self, root: impl Into<PathBuf>, ) -> Result<Arc<WorkspacePersistentIndex>, WorkspaceIndexError>
Enable a workspace-owned persistent zvec FTS index before the catalog is initialized. The existing manifest watcher remains the sole source of updates; this only adds a durable projection of each catalog snapshot.
Sourcepub fn persistent_index(&self) -> Option<Arc<WorkspacePersistentIndex>>
pub fn persistent_index(&self) -> Option<Arc<WorkspacePersistentIndex>>
Already-attached durable FTS handle, if any. Does not open native files.
Sourcepub fn ensure_persistent_index(&self) -> Option<Arc<WorkspacePersistentIndex>>
pub fn ensure_persistent_index(&self) -> Option<Arc<WorkspacePersistentIndex>>
Open the workspace durable zvec FTS projection on BM25 demand.
Grep must not call this — it stays on the filesystem / manifest / optional trigram plane. Safe after the chunk catalog has already started. When the catalog was started without a wired coordinator, BM25 may still read a warm on-disk generation while the portable catalog remains the live admission authority and update path.
Sourcepub fn configure_chunk_catalog(
&self,
strategy: WorkspaceChunkingStrategy,
chunking: ChunkingConfig,
limits: ChunkCatalogLimits,
) -> Result<Arc<WorkspaceChunkCatalog>, WorkspaceIndexError>
pub fn configure_chunk_catalog( &self, strategy: WorkspaceChunkingStrategy, chunking: ChunkingConfig, limits: ChunkCatalogLimits, ) -> Result<Arc<WorkspaceChunkCatalog>, WorkspaceIndexError>
Configure and enable the catalog owned by this shared manifest backend.
Hosts that supply super::WorkspaceServices to a session must call
this before Self::chunk_catalog or a retrieval service constructor
enables the default catalog. Configuration is one-shot so later
sessions cannot silently replace the strategy or budgets owned by the
host.
Sourcepub fn configure_chunk_catalog_with_engine(
&self,
strategy: WorkspaceChunkingStrategy,
chunking: ChunkingConfig,
limits: ChunkCatalogLimits,
lexical_engine: WorkspaceLexicalEngine,
) -> Result<Arc<WorkspaceChunkCatalog>, WorkspaceIndexError>
pub fn configure_chunk_catalog_with_engine( &self, strategy: WorkspaceChunkingStrategy, chunking: ChunkingConfig, limits: ChunkCatalogLimits, lexical_engine: WorkspaceLexicalEngine, ) -> Result<Arc<WorkspaceChunkCatalog>, WorkspaceIndexError>
Configure the catalog with an explicit typed lexical engine.
pub fn local_root(&self) -> &Path
Trait Implementations§
Source§impl Drop for ManifestWorkspaceBackend
impl Drop for ManifestWorkspaceBackend
Source§impl WorkspaceCommandRunner for ManifestWorkspaceBackend
impl WorkspaceCommandRunner for ManifestWorkspaceBackend
fn exec<'life0, 'async_trait>(
&'life0 self,
request: CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<CommandOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl WorkspaceFileSystem for ManifestWorkspaceBackend
impl WorkspaceFileSystem for ManifestWorkspaceBackend
fn read_text<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
) -> Pin<Box<dyn Future<Output = WorkspaceResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_text<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = WorkspaceResult<WorkspaceWriteOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_dir<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
) -> Pin<Box<dyn Future<Output = WorkspaceResult<Vec<WorkspaceDirEntry>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl WorkspaceGit for ManifestWorkspaceBackend
impl WorkspaceGit for ManifestWorkspaceBackend
fn is_repository<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn log<'life0, 'async_trait>(
&'life0 self,
max_count: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitCommit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_branches<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitBranch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_branch<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCreateBranchRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn checkout<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCheckoutRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitCheckoutOutput>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn diff<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitDiffRequest,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_remotes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitRemote>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl WorkspaceGitStashProvider for ManifestWorkspaceBackend
impl WorkspaceGitStashProvider for ManifestWorkspaceBackend
fn list_stashes<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitStash>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stash<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitStashRequest,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl WorkspaceGitWorktreeProvider for ManifestWorkspaceBackend
impl WorkspaceGitWorktreeProvider for ManifestWorkspaceBackend
fn list_worktrees<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<WorkspaceGitWorktree>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_worktree<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitCreateWorktreeRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitWorktreeMutation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn remove_worktree<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGitRemoveWorktreeRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGitWorktreeMutation>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl WorkspaceSearch for ManifestWorkspaceBackend
impl WorkspaceSearch for ManifestWorkspaceBackend
fn glob<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGlobRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGlobResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn grep<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGrepRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGrepResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn grep_with_sources<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGrepRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGrepOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn grep_with_sources<'life0, 'async_trait>(
&'life0 self,
request: WorkspaceGrepRequest,
) -> Pin<Box<dyn Future<Output = Result<WorkspaceGrepOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl WorkspaceTextReader for ManifestWorkspaceBackend
impl WorkspaceTextReader for ManifestWorkspaceBackend
fn read_text_range<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 WorkspacePath,
offset: usize,
limit: usize,
) -> Pin<Box<dyn Future<Output = WorkspaceResult<WorkspaceTextRange>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl !Freeze for ManifestWorkspaceBackend
impl !RefUnwindSafe for ManifestWorkspaceBackend
impl !UnwindSafe for ManifestWorkspaceBackend
impl Send for ManifestWorkspaceBackend
impl Sync for ManifestWorkspaceBackend
impl Unpin for ManifestWorkspaceBackend
impl UnsafeUnpin for ManifestWorkspaceBackend
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> 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> ⓘ
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