Skip to main content

ArtifactSaver

Trait ArtifactSaver 

Source
pub trait ArtifactSaver: Artifact {
    // Required method
    fn filename(&self) -> String;

    // Provided method
    fn try_write_to_dir(&self, path: &Path) -> Result<PathBuf, Error> { ... }
}
Expand description

An artifact which is a file It can be saved in a directory, as it has its own filename

Required Methods§

Source

fn filename(&self) -> String

Returns filename

Provided Methods§

Source

fn try_write_to_dir(&self, path: &Path) -> Result<PathBuf, Error>

Tries to save the contents to directory using the file name

Implementors§