pub struct WorkspaceGraph<S> { /* private fields */ }Expand description
Core recursive-workspace graph over one durable lineage adapter.
Implementations§
Source§impl<S> WorkspaceGraph<S>
impl<S> WorkspaceGraph<S>
Source§impl<S: WorkspaceLineageStore> WorkspaceGraph<S>
impl<S: WorkspaceLineageStore> WorkspaceGraph<S>
Sourcepub async fn register_root<A: AsyncAuthorityStore, O: AsyncObjectStore>(
&self,
workspace: &Workspace<A, O>,
) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
pub async fn register_root<A: AsyncAuthorityStore, O: AsyncObjectStore>( &self, workspace: &Workspace<A, O>, ) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
Registers a root workspace with no publication parent.
Sourcepub async fn fork<A: AsyncAuthorityStore, O: AsyncObjectStore>(
&self,
parent: &Workspace<A, O>,
destination: impl AsRef<str>,
idempotency_key: IdempotencyKey,
) -> Result<Workspace<A, O>, WorkspaceLineageError<S::Error>>
pub async fn fork<A: AsyncAuthorityStore, O: AsyncObjectStore>( &self, parent: &Workspace<A, O>, destination: impl AsRef<str>, idempotency_key: IdempotencyKey, ) -> Result<Workspace<A, O>, WorkspaceLineageError<S::Error>>
Forks a real SDK workspace and durably records its direct parent.
Sourcepub async fn register_existing_child<A: AsyncAuthorityStore, O: AsyncObjectStore>(
&self,
parent: &Workspace<A, O>,
child: &Workspace<A, O>,
fork_generation: GenerationId,
) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
pub async fn register_existing_child<A: AsyncAuthorityStore, O: AsyncObjectStore>( &self, parent: &Workspace<A, O>, child: &Workspace<A, O>, fork_generation: GenerationId, ) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
Registers a child created by another SDK-owned fork façade.
Lazy workspaces use this after their source-overlay binding and physical workspace fork have both become durable. Repeating the exact lineage is idempotent; a competing parent or fork point is rejected.
Sourcepub async fn register_existing_child_at_generation<A: AsyncAuthorityStore, O: AsyncObjectStore>(
&self,
parent: &Workspace<A, O>,
child: &Workspace<A, O>,
fork_generation: GenerationId,
initial_generation: GenerationId,
) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
pub async fn register_existing_child_at_generation<A: AsyncAuthorityStore, O: AsyncObjectStore>( &self, parent: &Workspace<A, O>, child: &Workspace<A, O>, fork_generation: GenerationId, initial_generation: GenerationId, ) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
Registers an existing child after it has advanced beyond its initial fork generation, while still authenticating that exact fork point.
Verifies that parent is the child’s exact direct publication target.
Sourcepub async fn resolve(
&self,
workspace: WorkspaceId,
) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
pub async fn resolve( &self, workspace: WorkspaceId, ) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>
Resolves one durable workspace identity to its canonical lineage record.
This is the restart-safe lookup used by thin adapters that retain only workspace IDs in compatibility state.
Sourcepub async fn ancestors(
&self,
workspace: WorkspaceId,
maximum: u32,
) -> Result<Vec<WorkspaceLineageRecord>, WorkspaceLineageError<S::Error>>
pub async fn ancestors( &self, workspace: WorkspaceId, maximum: u32, ) -> Result<Vec<WorkspaceLineageRecord>, WorkspaceLineageError<S::Error>>
Returns the direct-parent chain, nearest parent first.
Auto Trait Implementations§
impl<S> Freeze for WorkspaceGraph<S>where
S: Freeze,
impl<S> RefUnwindSafe for WorkspaceGraph<S>where
S: RefUnwindSafe,
impl<S> Send for WorkspaceGraph<S>where
S: Send,
impl<S> Sync for WorkspaceGraph<S>where
S: Sync,
impl<S> Unpin for WorkspaceGraph<S>where
S: Unpin,
impl<S> UnsafeUnpin for WorkspaceGraph<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for WorkspaceGraph<S>where
S: UnwindSafe,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request