pub struct PackageReceipt {
pub name: String,
pub version: String,
pub attempts: u32,
pub state: PackageState,
pub started_at: DateTime<Utc>,
pub finished_at: DateTime<Utc>,
pub duration_ms: u128,
pub evidence: PackageEvidence,
pub compromised_at: Option<DateTime<Utc>>,
pub compromised_by: Option<String>,
pub superseded_by: Option<String>,
}Expand description
Receipt for a successfully published package.
This contains all evidence and metadata for a published crate,
useful for auditing and debugging. It’s part of the final
Receipt document.
§Example
ⓘ
use chrono::Utc;
use shipper::types::{PackageReceipt, PackageState, PackageEvidence};
let receipt = PackageReceipt {
name: "my-crate".to_string(),
version: "1.2.3".to_string(),
attempts: 1,
state: PackageState::Published,
started_at: Utc::now(),
finished_at: Utc::now(),
duration_ms: 5000,
evidence: PackageEvidence {
attempts: vec![],
readiness_checks: vec![],
},
/// compromised_at: None,
compromised_by: None,
superseded_by: None,
};Fields§
§name: String§version: String§attempts: u32§state: PackageState§started_at: DateTime<Utc>§finished_at: DateTime<Utc>§duration_ms: u128§evidence: PackageEvidence§compromised_at: Option<DateTime<Utc>>When this specific package+version was marked compromised. None
if the package is healthy (the default for every published receipt).
compromised_by: Option<String>Operator-supplied reason / attribution for the compromise marker.
Often a CVE ID, an incident ticket, or a short free-form tag.
Example: "CVE-2026-0001: token leak via debug impl".
superseded_by: Option<String>If a fix-forward release superseded this version, the successor
version string (e.g., "0.3.1"). Populated by shipper fix-forward
(PR 3); None before that PR lands OR when no fix release exists.
Trait Implementations§
Source§impl Clone for PackageReceipt
impl Clone for PackageReceipt
Source§fn clone(&self) -> PackageReceipt
fn clone(&self) -> PackageReceipt
Returns a duplicate of the value. Read more
1.0.0 · 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 PackageReceipt
impl Debug for PackageReceipt
Source§impl<'de> Deserialize<'de> for PackageReceipt
impl<'de> Deserialize<'de> for PackageReceipt
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PackageReceipt
impl RefUnwindSafe for PackageReceipt
impl Send for PackageReceipt
impl Sync for PackageReceipt
impl Unpin for PackageReceipt
impl UnsafeUnpin for PackageReceipt
impl UnwindSafe for PackageReceipt
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