pub struct ArtifactReceipt { /* private fields */ }Expand description
The framework’s record of a completed artifact write.
A receipt only exists once the write succeeded, so its destination is a
fact, not an intention. It is serialized into the report envelope under
receipt as:
{ "destination": "/tmp/export.csv", "stdout": false, "byte_count": 20 }Implementations§
Source§impl ArtifactReceipt
impl ArtifactReceipt
Sourcepub fn new(destination: ArtifactDestination, byte_count: usize) -> Self
pub fn new(destination: ArtifactDestination, byte_count: usize) -> Self
Records a completed write of byte_count bytes to destination.
Framework-owned: applications receive receipts, they do not mint them.
Sourcepub fn destination(&self) -> &ArtifactDestination
pub fn destination(&self) -> &ArtifactDestination
Returns the destination the write completed to.
Sourcepub fn path(&self) -> Option<&Path>
pub fn path(&self) -> Option<&Path>
Returns the written file’s path, or None if the bytes went to stdout.
Sourcepub fn byte_count(&self) -> usize
pub fn byte_count(&self) -> usize
Returns the number of artifact bytes the write covered.
Trait Implementations§
Source§impl Clone for ArtifactReceipt
impl Clone for ArtifactReceipt
Source§fn clone(&self) -> ArtifactReceipt
fn clone(&self) -> ArtifactReceipt
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ArtifactReceipt
impl Debug for ArtifactReceipt
impl Eq for ArtifactReceipt
Source§impl PartialEq for ArtifactReceipt
impl PartialEq for ArtifactReceipt
Source§impl Serialize for ArtifactReceipt
impl Serialize for ArtifactReceipt
impl StructuralPartialEq for ArtifactReceipt
Auto Trait Implementations§
impl Freeze for ArtifactReceipt
impl RefUnwindSafe for ArtifactReceipt
impl Send for ArtifactReceipt
impl Sync for ArtifactReceipt
impl Unpin for ArtifactReceipt
impl UnsafeUnpin for ArtifactReceipt
impl UnwindSafe for ArtifactReceipt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more