Skip to main content

WorkspaceGraph

Struct WorkspaceGraph 

Source
pub struct WorkspaceGraph<S> { /* private fields */ }
Expand description

Core recursive-workspace graph over one durable lineage adapter.

Implementations§

Source§

impl<S> WorkspaceGraph<S>

Source

pub const fn new(store: S) -> Self

Creates a graph over a durable state adapter.

Source

pub const fn store(&self) -> &S

Borrows the underlying adapter.

Source§

impl<S: WorkspaceLineageStore> WorkspaceGraph<S>

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub async fn authorize_join( &self, child: WorkspaceId, parent: WorkspaceId, ) -> Result<WorkspaceLineageRecord, WorkspaceLineageError<S::Error>>

Verifies that parent is the child’s exact direct publication target.

Source

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.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> StorageFuture for T
where T: Send,

Source§

impl<T> StorageProvider for T
where T: Send + Sync + ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more