Trait Artifact

Source
pub trait Artifact: Send + Sync {
    // Required methods
    fn classifier(&self) -> Option<String>;
    fn extension(&self) -> String;
    fn name(&self) -> String;
    fn artifact_type(&self) -> String;

    // Provided methods
    fn date(&self) -> Option<Date> { ... }
    fn file(&self) -> PathBuf { ... }
    fn buildable(&self) -> Option<Box<dyn Buildable>> { ... }
}
Expand description

Represents the artifact output of some task

Required Methods§

Source

fn classifier(&self) -> Option<String>

The classifier of the artifact, if any

Source

fn extension(&self) -> String

The extension of this published artifact

Source

fn name(&self) -> String

The name of the artifact

Source

fn artifact_type(&self) -> String

The type of the artifact.

By default, this value is the name as the extension but can have a different value.

Provided Methods§

Source

fn date(&self) -> Option<Date>

The date that should be used when publishing the artifact.

By default, nothing is returned

Source

fn file(&self) -> PathBuf

Gets the file for this artifact.

By default, this value is [name][-[classifier]].[extension]

Source

fn buildable(&self) -> Option<Box<dyn Buildable>>

Trait Implementations§

Source§

impl Artifact for Box<dyn Artifact>

Source§

fn classifier(&self) -> Option<String>

The classifier of the artifact, if any
Source§

fn date(&self) -> Option<Date>

The date that should be used when publishing the artifact. Read more
Source§

fn extension(&self) -> String

The extension of this published artifact
Source§

fn name(&self) -> String

The name of the artifact
Source§

fn artifact_type(&self) -> String

The type of the artifact. Read more
Source§

fn file(&self) -> PathBuf

Gets the file for this artifact. Read more
Source§

fn buildable(&self) -> Option<Box<dyn Buildable>>

Implementations on Foreign Types§

Source§

impl Artifact for Box<dyn Artifact>

Source§

impl Artifact for Arc<dyn Artifact>

Implementors§