1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use async_trait::async_trait;
use snafu::Snafu;
use std::path::PathBuf;

#[derive(Snafu, Debug)]
pub enum Error {
  InternalBundlePackagerError {
    source: Box<dyn std::error::Error + Sync + Send>,
  },
}

pub type Result<T, E = Error> = std::result::Result<T, E>;

#[async_trait(?Send)]
pub trait BundlePackager {
  async fn generate(&self, path: PathBuf) -> Result<()>;
}