pub trait TemporaryRefPublisher: Send {
Show 26 methods
// Required methods
fn doctor(
&mut self,
request: &TemporaryRefDoctorRequest<'_>,
) -> Result<TemporaryRefPublisherReadiness, TemporaryRefPublishError>;
fn publish(
&mut self,
request: &TemporaryRefPublishRequest<'_>,
) -> Result<PublishedTemporaryRef, TemporaryRefPublishFailure>;
fn delete_temporary_ref(
&mut self,
request: &TemporaryRefDeleteRequest<'_>,
) -> Result<(), TemporaryRefPublishError>;
// Provided methods
fn supports_git_snapshot(&self) -> bool { ... }
fn verify_execution_workflow(
&mut self,
_request: &ExecutionWorkflowDoctorRequest<'_>,
) -> Result<TemporaryRefPublisherReadiness, TemporaryRefPublishError> { ... }
fn precompute_git_snapshot(
&mut self,
_inputs: &mut GitSnapshotPrecomputeInputs,
_operation_id: &str,
_created_at_ms: u64,
) -> Result<GitSnapshotObjectGraphV1, TemporaryRefPublishError> { ... }
fn adopt_git_snapshot_stage(
&mut self,
_request: &IosDeviceBuildRequest,
) -> Result<(GitSnapshotStageLocatorV1, GitSnapshotStageV1), TemporaryRefPublishError> { ... }
fn discover_git_snapshot_stages(
&mut self,
) -> Result<Vec<GithubGitSnapshotRecoveryCandidateV1>, TemporaryRefPublishError> { ... }
fn import_git_snapshot(
&mut self,
_request: &GitSnapshotImportRequest<'_>,
) -> Result<GitSnapshotObjectGraphV1, TemporaryRefPublishError> { ... }
fn precompute_exact_git_snapshot_retry(
&mut self,
_request: &GitSnapshotExactRetryPrecomputeRequest<'_>,
) -> Result<GithubGitSnapshotExactRetryPlanV1, TemporaryRefPublishError> { ... }
fn stage_exact_git_snapshot_retry(
&mut self,
_request: &GitSnapshotExactRetryStageRequest<'_>,
) -> Result<GithubGitSnapshotExactRetryStageV1, TemporaryRefPublishError> { ... }
fn delete_git_snapshot_stage(
&mut self,
_request: &GitSnapshotImportRequest<'_>,
) -> Result<(), TemporaryRefPublishError> { ... }
fn reconcile_git_snapshot_keepalive(
&mut self,
_request: &GitSnapshotKeepaliveRequest<'_>,
) -> Result<GitSnapshotRefReconciliation, TemporaryRefPublishError> { ... }
fn create_git_snapshot_keepalive(
&mut self,
_request: &GitSnapshotKeepaliveRequest<'_>,
) -> Result<(), TemporaryRefPublishError> { ... }
fn publish_git_snapshot_source(
&mut self,
_request: &GitSnapshotSourcePublishRequest<'_>,
) -> Result<GitSnapshotSourcePublication, TemporaryRefPublishError> { ... }
fn reconcile_git_snapshot_source(
&mut self,
_request: &GitSnapshotSourcePublishRequest<'_>,
) -> Result<GitSnapshotRefReconciliation, TemporaryRefPublishError> { ... }
fn delete_git_snapshot_source(
&mut self,
_request: &GitSnapshotSourceDeleteRequest<'_>,
) -> Result<(), TemporaryRefPublishError> { ... }
fn release_git_snapshot_keepalive(
&mut self,
_request: &GitSnapshotKeepaliveRequest<'_>,
) -> Result<(), TemporaryRefPublishError> { ... }
fn prepare(
&mut self,
_request: &TemporaryRefPublishRequest<'_>,
) -> Result<Option<PublishedTemporaryRef>, TemporaryRefPublishError> { ... }
fn publication_attempt_is_process_fenced(&self) -> bool { ... }
fn acquire_git_snapshot_source_lease(
&mut self,
_request: &GitSnapshotSourcePublicationLeaseRequest<'_>,
) -> Result<TemporaryRefPublicationLease, TemporaryRefPublishError> { ... }
fn release_git_snapshot_source_lease(
&mut self,
_request: &GitSnapshotSourcePublicationLeaseRequest<'_>,
) { ... }
fn publication_lease_scope_sha256(&self) -> Option<&str> { ... }
fn acquire_publication_lease(
&mut self,
_request: &TemporaryRefPublicationLeaseRequest<'_>,
) -> Result<TemporaryRefPublicationLease, TemporaryRefPublishError> { ... }
fn release_publication_lease(
&mut self,
_request: &TemporaryRefPublicationLeaseRequest<'_>,
) { ... }
fn publish_prepared(
&mut self,
request: &TemporaryRefPublishRequest<'_>,
prepared: Option<&PublishedTemporaryRef>,
) -> Result<PublishedTemporaryRef, TemporaryRefPublishFailure> { ... }
}Expand description
Injectable publication boundary used by the provider.
Implementations must not call back into the provider. Some operations are invoked while the provider holds internal job state needed to serialize remote mutations and their checkpoints.
Required Methods§
Sourcefn doctor(
&mut self,
request: &TemporaryRefDoctorRequest<'_>,
) -> Result<TemporaryRefPublisherReadiness, TemporaryRefPublishError>
fn doctor( &mut self, request: &TemporaryRefDoctorRequest<'_>, ) -> Result<TemporaryRefPublisherReadiness, TemporaryRefPublishError>
Verify local Git and exact remote/trusted-ref readiness without mutation.
§Errors
Returns a redacted readiness error when remote identity, trusted-ref availability, or approved workflow bytes cannot be verified exactly.
Sourcefn publish(
&mut self,
request: &TemporaryRefPublishRequest<'_>,
) -> Result<PublishedTemporaryRef, TemporaryRefPublishFailure>
fn publish( &mut self, request: &TemporaryRefPublishRequest<'_>, ) -> Result<PublishedTemporaryRef, TemporaryRefPublishFailure>
Create and push one exact temporary dispatch ref.
§Errors
Returns a redacted failure and, after a possibly mutating push, exact cleanup ownership.
Sourcefn delete_temporary_ref(
&mut self,
request: &TemporaryRefDeleteRequest<'_>,
) -> Result<(), TemporaryRefPublishError>
fn delete_temporary_ref( &mut self, request: &TemporaryRefDeleteRequest<'_>, ) -> Result<(), TemporaryRefPublishError>
Delete one provider-owned temporary ref with an exact expected-tip lease. Replaying the same exact deletion after a crash must succeed when the ref is already absent.
§Errors
Returns a redacted failure when the lease is rejected or exact deletion cannot be verified.
Provided Methods§
Sourcefn supports_git_snapshot(&self) -> bool
fn supports_git_snapshot(&self) -> bool
Whether this publisher implements the complete retained-byte Git snapshot contract.
Sourcefn verify_execution_workflow(
&mut self,
_request: &ExecutionWorkflowDoctorRequest<'_>,
) -> Result<TemporaryRefPublisherReadiness, TemporaryRefPublishError>
fn verify_execution_workflow( &mut self, _request: &ExecutionWorkflowDoctorRequest<'_>, ) -> Result<TemporaryRefPublisherReadiness, TemporaryRefPublishError>
Verify exact workflow bytes from the execution repository default branch without mutation.
§Errors
Returns a redacted readiness error when the execution remote, stable default ref, or exact approved bytes cannot be proven.
Sourcefn precompute_git_snapshot(
&mut self,
_inputs: &mut GitSnapshotPrecomputeInputs,
_operation_id: &str,
_created_at_ms: u64,
) -> Result<GitSnapshotObjectGraphV1, TemporaryRefPublishError>
fn precompute_git_snapshot( &mut self, _inputs: &mut GitSnapshotPrecomputeInputs, _operation_id: &str, _created_at_ms: u64, ) -> Result<GitSnapshotObjectGraphV1, TemporaryRefPublishError>
Hash the two retained staged payloads and canonical four-object suffix without writing.
§Errors
Returns a redacted fixed-Git, stage-binding, object-format, or graph failure.
Sourcefn adopt_git_snapshot_stage(
&mut self,
_request: &IosDeviceBuildRequest,
) -> Result<(GitSnapshotStageLocatorV1, GitSnapshotStageV1), TemporaryRefPublishError>
fn adopt_git_snapshot_stage( &mut self, _request: &IosDeviceBuildRequest, ) -> Result<(GitSnapshotStageLocatorV1, GitSnapshotStageV1), TemporaryRefPublishError>
Reopen a complete uncheckpointed stage without mutation for a caller that will perform fresh explicit-consent validation before creating the first durable snapshot checkpoint.
§Errors
Returns a redacted stage or final-request binding failure.
Sourcefn discover_git_snapshot_stages(
&mut self,
) -> Result<Vec<GithubGitSnapshotRecoveryCandidateV1>, TemporaryRefPublishError>
fn discover_git_snapshot_stages( &mut self, ) -> Result<Vec<GithubGitSnapshotRecoveryCandidateV1>, TemporaryRefPublishError>
Enumerate complete private stages using reads only.
Implementations must fail the whole bounded enumeration on any partial, malformed, unknown, or identity-rebound entry. Discovery never adopts or deletes a stage.
§Errors
Returns a redacted unsupported, recovery-changed, identity, or stage validation failure.
Sourcefn import_git_snapshot(
&mut self,
_request: &GitSnapshotImportRequest<'_>,
) -> Result<GitSnapshotObjectGraphV1, TemporaryRefPublishError>
fn import_git_snapshot( &mut self, _request: &GitSnapshotImportRequest<'_>, ) -> Result<GitSnapshotObjectGraphV1, TemporaryRefPublishError>
Reopen the exact durable stage and import all six objects while retaining its guards.
The retained import remains live inside the publisher until keepalive creation or explicit
release. Implementations must compare every actual hash-object -w result and revalidate
all staged bytes after each write.
§Errors
Returns a redacted stage, object-format, import, or graph failure.
Sourcefn precompute_exact_git_snapshot_retry(
&mut self,
_request: &GitSnapshotExactRetryPrecomputeRequest<'_>,
) -> Result<GithubGitSnapshotExactRetryPlanV1, TemporaryRefPublishError>
fn precompute_exact_git_snapshot_retry( &mut self, _request: &GitSnapshotExactRetryPrecomputeRequest<'_>, ) -> Result<GithubGitSnapshotExactRetryPlanV1, TemporaryRefPublishError>
Re-read a terminal parent’s exact archive blob and derive the immutable child request.
This operation may perform bounded reads and offline no-write hashing only. It must not create a stage, write a Git object, mutate a ref, or access the network.
§Errors
Returns a redacted parent blob, SHA-1, descriptor, or graph failure.
Sourcefn stage_exact_git_snapshot_retry(
&mut self,
_request: &GitSnapshotExactRetryStageRequest<'_>,
) -> Result<GithubGitSnapshotExactRetryStageV1, TemporaryRefPublishError>
fn stage_exact_git_snapshot_retry( &mut self, _request: &GitSnapshotExactRetryStageRequest<'_>, ) -> Result<GithubGitSnapshotExactRetryStageV1, TemporaryRefPublishError>
Re-read a terminal parent’s exact archive blob and create one operation-bound child stage.
The caller must have durably created the parent/child lineage before this method. The implementation must first reproduce the already-durable no-write plan exactly. It may then write only the bounded private child stage; it must not recapture a workspace or mutate local/remote refs.
§Errors
Returns a redacted parent blob, stage, SHA-1, descriptor, or graph failure.
Sourcefn delete_git_snapshot_stage(
&mut self,
_request: &GitSnapshotImportRequest<'_>,
) -> Result<(), TemporaryRefPublishError>
fn delete_git_snapshot_stage( &mut self, _request: &GitSnapshotImportRequest<'_>, ) -> Result<(), TemporaryRefPublishError>
Delete the exact bounded stage after its keepalive is durably confirmed.
Replay succeeds only when the whole stage is already absent or every remaining entry still has its durable identity. Partial or rebound stages fail closed.
§Errors
Returns a redacted identity, exact-removal, or directory-durability failure.
Sourcefn reconcile_git_snapshot_keepalive(
&mut self,
_request: &GitSnapshotKeepaliveRequest<'_>,
) -> Result<GitSnapshotRefReconciliation, TemporaryRefPublishError>
fn reconcile_git_snapshot_keepalive( &mut self, _request: &GitSnapshotKeepaliveRequest<'_>, ) -> Result<GitSnapshotRefReconciliation, TemporaryRefPublishError>
Reconcile one exact local keepalive ref without mutation.
§Errors
Returns a redacted local Git or ref-parse failure.
Sourcefn create_git_snapshot_keepalive(
&mut self,
_request: &GitSnapshotKeepaliveRequest<'_>,
) -> Result<(), TemporaryRefPublishError>
fn create_git_snapshot_keepalive( &mut self, _request: &GitSnapshotKeepaliveRequest<'_>, ) -> Result<(), TemporaryRefPublishError>
Create the exact local keepalive after its durable intent checkpoint.
Implementations must keep retained staged-file guards live and revalidate them immediately before and after the create-only ref mutation.
§Errors
Returns a redacted stage, local Git, or conflicting-ref failure.
Sourcefn publish_git_snapshot_source(
&mut self,
_request: &GitSnapshotSourcePublishRequest<'_>,
) -> Result<GitSnapshotSourcePublication, TemporaryRefPublishError>
fn publish_git_snapshot_source( &mut self, _request: &GitSnapshotSourcePublishRequest<'_>, ) -> Result<GitSnapshotSourcePublication, TemporaryRefPublishError>
Publish one exact create-only custom source ref after durable intent.
§Errors
Returns a redacted authorization, endpoint, Git, or verification failure.
Sourcefn reconcile_git_snapshot_source(
&mut self,
_request: &GitSnapshotSourcePublishRequest<'_>,
) -> Result<GitSnapshotRefReconciliation, TemporaryRefPublishError>
fn reconcile_git_snapshot_source( &mut self, _request: &GitSnapshotSourcePublishRequest<'_>, ) -> Result<GitSnapshotRefReconciliation, TemporaryRefPublishError>
Reconcile one exact custom source ref using reads only.
§Errors
Returns a redacted endpoint, Git, or ref-parse failure.
Sourcefn delete_git_snapshot_source(
&mut self,
_request: &GitSnapshotSourceDeleteRequest<'_>,
) -> Result<(), TemporaryRefPublishError>
fn delete_git_snapshot_source( &mut self, _request: &GitSnapshotSourceDeleteRequest<'_>, ) -> Result<(), TemporaryRefPublishError>
Delete only the exact provider-owned custom source ref.
§Errors
Returns a redacted authorization, lease-conflict, Git, or absence-verification failure.
Sourcefn release_git_snapshot_keepalive(
&mut self,
_request: &GitSnapshotKeepaliveRequest<'_>,
) -> Result<(), TemporaryRefPublishError>
fn release_git_snapshot_keepalive( &mut self, _request: &GitSnapshotKeepaliveRequest<'_>, ) -> Result<(), TemporaryRefPublishError>
Release one exact local keepalive after its durable complete-lineage prune intent.
§Errors
Returns a redacted local Git, conflict, or absence-verification failure.
Sourcefn prepare(
&mut self,
_request: &TemporaryRefPublishRequest<'_>,
) -> Result<Option<PublishedTemporaryRef>, TemporaryRefPublishError>
fn prepare( &mut self, _request: &TemporaryRefPublishRequest<'_>, ) -> Result<Option<PublishedTemporaryRef>, TemporaryRefPublishError>
Complete read-only trust checks and optionally prepare the exact deterministic dispatch commit before the provider checkpoints mutation intent.
The default preserves alternate publishers that cannot expose a prepared commit. Such publishers remain fail-closed, but cannot use bounded missing-ref retirement after a crash.
§Errors
Returns a redacted preflight or local preparation error. This method must not mutate the remote repository.
Sourcefn publication_attempt_is_process_fenced(&self) -> bool
fn publication_attempt_is_process_fenced(&self) -> bool
Whether a publication started after successful prepare is unable to outlive this process.
Strong bounded absence retirement is disabled unless this guarantee is durable.
Sourcefn acquire_git_snapshot_source_lease(
&mut self,
_request: &GitSnapshotSourcePublicationLeaseRequest<'_>,
) -> Result<TemporaryRefPublicationLease, TemporaryRefPublishError>
fn acquire_git_snapshot_source_lease( &mut self, _request: &GitSnapshotSourcePublicationLeaseRequest<'_>, ) -> Result<TemporaryRefPublicationLease, TemporaryRefPublishError>
Acquire the source-repository/custom-ref scoped mutation lease.
§Errors
Returns a redacted local-isolation failure.
Sourcefn release_git_snapshot_source_lease(
&mut self,
_request: &GitSnapshotSourcePublicationLeaseRequest<'_>,
)
fn release_git_snapshot_source_lease( &mut self, _request: &GitSnapshotSourcePublicationLeaseRequest<'_>, )
Release this publisher’s exact source-repository/custom-ref lease, if owned.
Sourcefn publication_lease_scope_sha256(&self) -> Option<&str>
fn publication_lease_scope_sha256(&self) -> Option<&str>
Digest of the canonical local lease path and exact directory filesystem identity.
Sourcefn acquire_publication_lease(
&mut self,
_request: &TemporaryRefPublicationLeaseRequest<'_>,
) -> Result<TemporaryRefPublicationLease, TemporaryRefPublishError>
fn acquire_publication_lease( &mut self, _request: &TemporaryRefPublicationLeaseRequest<'_>, ) -> Result<TemporaryRefPublicationLease, TemporaryRefPublishError>
Try to own the deterministic publication across checkpoints and process crashes.
An Acquired or AlreadyOwned result requires the publisher to retain the underlying
operating-system lease until release_publication_lease or publisher drop.
§Errors
Returns a redacted local-isolation failure when the lease cannot be opened safely.
Sourcefn release_publication_lease(
&mut self,
_request: &TemporaryRefPublicationLeaseRequest<'_>,
)
fn release_publication_lease( &mut self, _request: &TemporaryRefPublicationLeaseRequest<'_>, )
Release one lease owned by this publisher instance after durable resolution.
Sourcefn publish_prepared(
&mut self,
request: &TemporaryRefPublishRequest<'_>,
prepared: Option<&PublishedTemporaryRef>,
) -> Result<PublishedTemporaryRef, TemporaryRefPublishFailure>
fn publish_prepared( &mut self, request: &TemporaryRefPublishRequest<'_>, prepared: Option<&PublishedTemporaryRef>, ) -> Result<PublishedTemporaryRef, TemporaryRefPublishFailure>
Publish after a durable intent checkpoint, binding any prepared commit exactly. Publishers returning prepared evidence must override this method and validate that evidence before their first remote mutation; the default refuses prepared publication.
§Errors
Returns a redacted publication failure and exact possible cleanup ownership after mutation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".