pub struct ReceiptBuilder { /* private fields */ }Expand description
Assembles a Receipt from a finished run plus the things the loop does
not know: the clock, the model’s name, and the audit id.
Implementations§
Source§impl ReceiptBuilder
impl ReceiptBuilder
pub fn new( task: impl Into<String>, model: impl Into<String>, finished_ms: i64, ) -> Self
pub fn with_audit_request(self, id: impl Into<String>) -> Self
Sourcepub fn build(self, outcome: &Outcome) -> Receipt
pub fn build(self, outcome: &Outcome) -> Receipt
Build from the outcome.
Outcomes other than Done are receipted too, and as failures: a run
that exhausted its budget produced no verified result, and a receipt
that quietly omitted it would let “no receipt” and “a bad receipt” look
the same to whatever is reading them.
Auto Trait Implementations§
impl Freeze for ReceiptBuilder
impl RefUnwindSafe for ReceiptBuilder
impl Send for ReceiptBuilder
impl Sync for ReceiptBuilder
impl Unpin for ReceiptBuilder
impl UnsafeUnpin for ReceiptBuilder
impl UnwindSafe for ReceiptBuilder
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