pub struct Bundle {
pub schema_version: u32,
pub app: String,
pub platform: String,
pub run_id: String,
pub started_at: String,
pub finished_at: Option<String>,
pub status: RunStatus,
pub identity: Value,
pub checks: Vec<Check>,
pub artifacts: Vec<Artifact>,
}Fields§
§schema_version: u32§app: String§platform: String§run_id: String§started_at: String§finished_at: Option<String>§status: RunStatus§identity: ValueWhat was tested: config, scenario, binary and source-revision digests.
checks: Vec<Check>§artifacts: Vec<Artifact>Implementations§
Source§impl Bundle
impl Bundle
pub fn new(app: &str, platform: &str, run_id: &str) -> Result<Self>
Sourcepub fn add_artifact(&mut self, name: &str, path: &Path) -> Result<Artifact>
pub fn add_artifact(&mut self, name: &str, path: &Path) -> Result<Artifact>
Hash a file into the bundle now, so a later replacement cannot masquerade.
pub fn add_check( &mut self, name: &str, status: CheckStatus, details: Value, artifacts: &[String], ) -> Result<()>
Sourcepub fn set_identity(&mut self, identity: Value) -> Result<()>
pub fn set_identity(&mut self, identity: Value) -> Result<()>
Bind this receipt to the exact inputs it exercised. A passing receipt without an identity is refused at write time.
pub fn finish(&mut self, status: RunStatus)
Sourcepub fn verify(&self) -> Vec<(String, String)>
pub fn verify(&self) -> Vec<(String, String)>
Re-hash every artifact; empty means the receipt still describes the disk.
pub fn write(&self, path: &Path) -> Result<()>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Bundle
impl<'de> Deserialize<'de> for Bundle
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 Bundle
impl RefUnwindSafe for Bundle
impl Send for Bundle
impl Sync for Bundle
impl Unpin for Bundle
impl UnsafeUnpin for Bundle
impl UnwindSafe for Bundle
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