Skip to main content

EcosystemAdapter

Enum EcosystemAdapter 

Source
pub enum EcosystemAdapter {
    Rust(CargoAdapter),
    Node(NodeAdapter),
    Python(PythonAdapter),
    Go(GoAdapter),
    Homebrew(HomebrewAdapter),
    Binary(BinaryAdapter),
}
Expand description

The enum-backed registry: the six compiled-in ecosystem adapters, selected at runtime from the contract’s Adapter identity by resolve.

An enum (not an unconstrained Vec<&dyn ReleaseAdapter>) so wiring is compiler-checked: resolve’s match is exhaustive over every Adapter variant, and a new ecosystem is a new variant the compiler forces you to wire. Implements ReleaseAdapter by delegating to the resolved inner adapter, giving the coordinator one uniform dispatch type.

Variants§

§

Rust(CargoAdapter)

The rust ecosystem (cargo-publish / cargo-dist).

§

Node(NodeAdapter)

The node ecosystem (release-please / changesets / npm-publish).

§

Python(PythonAdapter)

The python ecosystem (gh-action-pypi-publish / twine).

§

Go(GoAdapter)

The go ecosystem (goreleaser).

§

Homebrew(HomebrewAdapter)

The homebrew distribution target (homebrew-tap / homebrew-core).

§

Binary(BinaryAdapter)

The binary distribution target (manual / GitHub Releases).

Trait Implementations§

Source§

impl ReleaseAdapter for EcosystemAdapter

Source§

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).
Source§

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. Read more
Source§

fn build( &self, ctx: &EffectCtx<'_>, target: &AdapterTarget, ) -> Result<BuildArtifacts, AdapterError>

Re-runnable build of the target’s publishable artifacts. Read more
Source§

fn publish( &self, ctx: &EffectCtx<'_>, target: &AdapterTarget, ) -> Result<PublishReceipt, AdapterError>

Per-target irreversible publish; returns the durable PublishReceipt. Read more
Source§

fn verify( &self, ctx: &EffectCtx<'_>, receipt: &PublishReceipt, ) -> Result<VerifyOutcome, AdapterError>

Read-only remote reconcile of a receipt against registry state. Read more
Source§

fn timeout(&self) -> Duration

Mandatory wall-clock ceiling for a single publish of this adapter — a hung publish must not wedge a run (ADR-0002 §1).

Auto Trait Implementations§

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<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.