Skip to main content

ReleaseBackend

Trait ReleaseBackend 

Source
pub trait ReleaseBackend: Send + Sync {
    // Required methods
    fn name(&self) -> &'static str;
    fn publish<'a>(
        &'a self,
        ctx: &'a BackendContext,
        artifacts: &'a [PackagedArtifact],
    ) -> Pin<Box<dyn Future<Output = Result<PublishResult>> + Send + 'a>>;
}
Expand description

Trait for release distribution backends.

Each backend handles publishing artifacts to a specific distribution channel (GitHub Releases, Homebrew, crates.io, CUE registry, etc.).

§Implementors

  • cuenv-github - GitHub Releases backend
  • cuenv-homebrew - Homebrew tap backend

§Example

See module-level documentation for implementation example.

Required Methods§

Source

fn name(&self) -> &'static str

Returns the name of this backend (e.g., “github”, “homebrew”).

Source

fn publish<'a>( &'a self, ctx: &'a BackendContext, artifacts: &'a [PackagedArtifact], ) -> Pin<Box<dyn Future<Output = Result<PublishResult>> + Send + 'a>>

Publishes the given artifacts to this backend.

§Arguments
  • ctx - Common context (version, dry-run flag, etc.)
  • artifacts - Packaged artifacts to publish
§Returns

A PublishResult indicating success or failure.

Implementors§