wasm_pkg_client/publisher.rs
1use crate::{PackageRef, PublishingSource, Version};
2
3#[async_trait::async_trait]
4pub trait PackagePublisher: Send + Sync {
5 /// Publishes the data to the registry. The given data should be a valid wasm component and can
6 /// be anything that implements [`AsyncRead`](tokio::io::AsyncRead) and
7 /// [`AsyncSeek`](tokio::io::AsyncSeek).
8 async fn publish(
9 &self,
10 package: &PackageRef,
11 version: &Version,
12 data: PublishingSource,
13 dry_run: bool,
14 ) -> Result<(), crate::Error>;
15}