Skip to main content

PackagePublisher

Trait PackagePublisher 

Source
pub(crate) trait PackagePublisher {
    type Error: StdError + Send + Sync + 'static;

    // Required methods
    async fn is_published(&self, unit: &Unit) -> Result<bool, Self::Error>;
    async fn publish(&self, unit: &Unit, file: &Path) -> Result<(), Self::Error>;
}
Expand description

Ecosystem package publication operations that are safe to retry.

Required Associated Types§

Source

type Error: StdError + Send + Sync + 'static

The failure of a package lookup or upload.

Required Methods§

Source

async fn is_published(&self, unit: &Unit) -> Result<bool, Self::Error>

Whether the unit’s version already exists where it is published.

Source

async fn publish(&self, unit: &Unit, file: &Path) -> Result<(), Self::Error>

Publish one unit’s staged package file.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§