pub struct ArtifactRun { /* private fields */ }Expand description
A completed artifact run: the framework’s outcome for Output::Artifact.
Carried by RunResult::Artifact. The receipt
is authoritative for a file destination — the bytes are already on disk. For
the stdout destination the byte write is deferred to the framework’s stdout
writer, which is why run() can still report a typed stdout write failure.
Implementations§
Source§impl ArtifactRun
impl ArtifactRun
Sourcepub fn new(
bytes: Vec<u8>,
suggested_destination: Option<PathBuf>,
receipt: ArtifactReceipt,
report: Option<String>,
) -> Self
pub fn new( bytes: Vec<u8>, suggested_destination: Option<PathBuf>, receipt: ArtifactReceipt, report: Option<String>, ) -> Self
Records a completed artifact run.
Framework-owned: report is the already-rendered (or serialized)
success report, which the framework only produces after the write.
Sourcepub fn bytes(&self) -> &[u8] ⓘ
pub fn bytes(&self) -> &[u8] ⓘ
Returns the artifact bytes, byte-for-byte as the handler produced them.
Sourcepub fn suggested_destination(&self) -> Option<&Path>
pub fn suggested_destination(&self) -> Option<&Path>
Returns what the application suggested, which may differ from where the bytes actually went.
Sourcepub fn receipt(&self) -> &ArtifactReceipt
pub fn receipt(&self) -> &ArtifactReceipt
Returns the framework’s receipt for the write.
Sourcepub fn destination(&self) -> &ArtifactDestination
pub fn destination(&self) -> &ArtifactDestination
Returns the destination the framework selected and completed.
Trait Implementations§
Source§impl Clone for ArtifactRun
impl Clone for ArtifactRun
Source§fn clone(&self) -> ArtifactRun
fn clone(&self) -> ArtifactRun
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more