pub trait ReleaseAdapter {
// Required methods
fn adapter(&self) -> Adapter;
fn dry_run(
&self,
ctx: &EffectCtx<'_>,
target: &AdapterTarget,
) -> Result<DryRunReport, AdapterError>;
fn build(
&self,
ctx: &EffectCtx<'_>,
target: &AdapterTarget,
) -> Result<BuildArtifacts, AdapterError>;
fn publish(
&self,
ctx: &EffectCtx<'_>,
target: &AdapterTarget,
) -> Result<PublishReceipt, AdapterError>;
fn timeout(&self) -> Duration;
// Provided method
fn verify(
&self,
ctx: &EffectCtx<'_>,
receipt: &PublishReceipt,
) -> Result<VerifyOutcome, AdapterError> { ... }
}Expand description
The per-ecosystem operations the release coordinator drives through its phase barriers (ADR-0002 §1).
Deliberately has no tag() — the shared git tag and GitHub Release are
owned by the coordinator alone, which is what makes “tag once, after every
publish” a structural guarantee rather than a discipline.
Required Methods§
Sourcefn adapter(&self) -> Adapter
fn adapter(&self) -> Adapter
The adapter identity this implementation operates as (a single struct may
back several related identities, e.g. cargo-publish and cargo-dist).
Sourcefn dry_run(
&self,
ctx: &EffectCtx<'_>,
target: &AdapterTarget,
) -> Result<DryRunReport, AdapterError>
fn dry_run( &self, ctx: &EffectCtx<'_>, target: &AdapterTarget, ) -> Result<DryRunReport, AdapterError>
Re-runnable, side-effect-free preview: the exact commands a real cut
would run for target.
§Errors
Returns AdapterError only if constructing the preview itself fails;
building a preview does not execute the planned commands.
Sourcefn build(
&self,
ctx: &EffectCtx<'_>,
target: &AdapterTarget,
) -> Result<BuildArtifacts, AdapterError>
fn build( &self, ctx: &EffectCtx<'_>, target: &AdapterTarget, ) -> Result<BuildArtifacts, AdapterError>
Re-runnable build of the target’s publishable artifacts.
§Errors
Returns AdapterError if a build command fails or is unsupported.
Sourcefn publish(
&self,
ctx: &EffectCtx<'_>,
target: &AdapterTarget,
) -> Result<PublishReceipt, AdapterError>
fn publish( &self, ctx: &EffectCtx<'_>, target: &AdapterTarget, ) -> Result<PublishReceipt, AdapterError>
Per-target irreversible publish; returns the durable
PublishReceipt.
§Errors
Returns AdapterError if a publish command fails or the publish is
unsupported from this host.
Provided Methods§
Sourcefn verify(
&self,
ctx: &EffectCtx<'_>,
receipt: &PublishReceipt,
) -> Result<VerifyOutcome, AdapterError>
fn verify( &self, ctx: &EffectCtx<'_>, receipt: &PublishReceipt, ) -> Result<VerifyOutcome, AdapterError>
Read-only remote reconcile of a receipt against registry state.
The default implementation queries RegistryQuery by the receipt’s
ecosystem + package and classifies via classify_receipt; a lookup
failure yields VerifyOutcome::Unknown. Adapters whose destination is
not observable through RegistryQuery (homebrew taps, GitHub Releases)
override this to return VerifyOutcome::Unknown explicitly.
§Errors
The default never errors (an outage is VerifyOutcome::Unknown, not an
Err); the fallible signature lets an override that shells out report a
genuine command failure.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".