pub struct Source<A, O> { /* private fields */ }Expand description
Cloneable handle to one exact attached native directory.
Implementations§
Source§impl<A: AsyncAuthorityStore, O: AsyncObjectStore> Source<A, O>
impl<A: AsyncAuthorityStore, O: AsyncObjectStore> Source<A, O>
Sourcepub async fn state(&self) -> SourceState
pub async fn state(&self) -> SourceState
Returns the current fail-closed semantic state.
Sourcepub async fn acknowledge_materialization(
&self,
key: IdempotencyKey,
) -> Result<ReconcileOutcome<A, O>, SourceError>
pub async fn acknowledge_materialization( &self, key: IdempotencyKey, ) -> Result<ReconcileOutcome<A, O>, SourceError>
Re-establishes a clean source baseline after the core materializer has installed a published workspace generation into the attached root.
A fresh checkout is opened at authenticated workspace HEAD and a full bounded rescan proves the resulting host tree. Any concurrent host change is captured as a later generation instead of being discarded.
Sourcepub async fn reconcile(&self) -> Result<ReconcileOutcome<A, O>, SourceError>
pub async fn reconcile(&self) -> Result<ReconcileOutcome<A, O>, SourceError>
Captures one bounded contiguous watcher interval and publishes it. A clean interval still advances authority ordering to atomically prove that its acknowledged workspace generation was current.
§Errors
Rejects pinned sources and propagates exact native/canonical failures.
Sourcepub async fn reconcile_with_key(
&self,
key: IdempotencyKey,
) -> Result<ReconcileOutcome<A, O>, SourceError>
pub async fn reconcile_with_key( &self, key: IdempotencyKey, ) -> Result<ReconcileOutcome<A, O>, SourceError>
Captures and publishes one watcher interval under a stable retry key.
An exact retry returns the original durable outcome, including after a process restart. Reusing the key for another lifecycle operation is an idempotency conflict.
§Errors
Rejects pinned sources, conflicting retry identities, and exact native/canonical failures.
Sourcepub async fn rescan(&self) -> Result<ReconcileOutcome<A, O>, SourceError>
pub async fn rescan(&self) -> Result<ReconcileOutcome<A, O>, SourceError>
Rebuilds one complete authenticated baseline while preserving events that arrive concurrently with the scan.
§Errors
Returns native, capture, authority, or storage failures without acknowledging an incomplete interval.
Sourcepub async fn rescan_with_key(
&self,
key: IdempotencyKey,
) -> Result<ReconcileOutcome<A, O>, SourceError>
pub async fn rescan_with_key( &self, key: IdempotencyKey, ) -> Result<ReconcileOutcome<A, O>, SourceError>
Rebuilds a complete baseline under a stable retry key.
§Errors
Returns conflicting retry identities and exact native/canonical failures.
Sourcepub async fn seal(&self) -> Result<Generation<A, O>, SourceError>
pub async fn seal(&self) -> Result<Generation<A, O>, SourceError>
Produces an immutable generation whose bytes no longer depend on the attached directory.
§Errors
Fails unless a complete authenticated rescan and publication succeeds.
Sourcepub async fn seal_with_key(
&self,
key: IdempotencyKey,
) -> Result<Generation<A, O>, SourceError>
pub async fn seal_with_key( &self, key: IdempotencyKey, ) -> Result<Generation<A, O>, SourceError>
Seals the source under a stable retry key.
§Errors
Returns conflicting retry identities and fails unless the original or recovered operation reached a clean sealed generation.
Trait Implementations§
Auto Trait Implementations§
impl<A, O> !RefUnwindSafe for Source<A, O>
impl<A, O> !UnwindSafe for Source<A, O>
impl<A, O> Freeze for Source<A, O>
impl<A, O> Send for Source<A, O>
impl<A, O> Sync for Source<A, O>
impl<A, O> Unpin for Source<A, O>
impl<A, O> UnsafeUnpin for Source<A, O>
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,
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