Skip to main content

PythonAdapter

Struct PythonAdapter 

Source
pub struct PythonAdapter { /* private fields */ }
Expand description

The python release adapter, operating as gh-action-pypi-publish or twine.

Implementations§

Source§

impl PythonAdapter

Source

pub fn new(adapter: Adapter) -> Self

Construct for a resolved python adapter identity.

Trait Implementations§

Source§

impl ReleaseAdapter for PythonAdapter

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 is_ci_delegated(&self) -> bool

Whether this adapter’s publish is CI-delegated — its release artifact is produced out-of-band by the tag-triggered CI (e.g. cargo-dist’s release.yml, a release-please merge job, PyPI’s trusted-publisher workflow), never by the engine’s publish step from this host. The coordinator skips such a target in publish-all (journalling a target_delegated fact) rather than calling publish and treating its honest AdapterError::Unsupported as a phase failure — which would leave the cut stuck after an irreversible crates.io publish. Read more
Source§

fn dry_run( &self, _ctx: &EffectCtx<'_>, _t: &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<'_>, t: &AdapterTarget, ) -> Result<BuildArtifacts, AdapterError>

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

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

Per-target irreversible publish; returns the durable PublishReceipt. 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).
Source§

fn ci_owns_github_release(&self) -> bool

Whether this adapter’s tag-triggered CI owns the shared GitHub Release — its workflow creates and finalizes the Release object (and uploads the cross-platform binaries into it), so the coordinator must NOT create the Release itself or the two clash over the same tag (coordinator-release-vs-cargo-dist-ownership). 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

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.