Skip to main content

Artifact

Trait Artifact 

Source
pub trait Artifact: Sized {
    // Required methods
    fn write_to_directory(
        &self,
        path: &Path,
    ) -> impl Future<Output = Result<()>> + Send;
    fn to_tarball(&self) -> Result<Vec<u8>, Error>;
    fn from_tarball(bytes: &[u8]) -> Result<Self, Error>;
    fn from_dir(path: &Path) -> impl Future<Output = Result<Self, Error>> + Send;
}
Expand description

The common trait for all artifact types. Requires Sized so we can return Self for the constructors.

Required Methods§

Source

fn write_to_directory( &self, path: &Path, ) -> impl Future<Output = Result<()>> + Send

Source

fn to_tarball(&self) -> Result<Vec<u8>, Error>

Source

fn from_tarball(bytes: &[u8]) -> Result<Self, Error>

Source

fn from_dir(path: &Path) -> impl Future<Output = Result<Self, Error>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§