pub struct ReceiptComposer;Expand description
Composes a Session Receipt from events and artifacts.
Implementations§
Source§impl ReceiptComposer
impl ReceiptComposer
Sourcepub fn compose(
manifest: &SessionManifest,
events: &[SessionEvent],
artifact_entries: Vec<ArtifactEntry>,
) -> SessionReceipt
pub fn compose( manifest: &SessionManifest, events: &[SessionEvent], artifact_entries: Vec<ArtifactEntry>, ) -> SessionReceipt
Compose a receipt from a session manifest, events, and optional artifact entries.
Sourcepub fn to_canonical_json(receipt: &SessionReceipt) -> Result<Vec<u8>, Error>
pub fn to_canonical_json(receipt: &SessionReceipt) -> Result<Vec<u8>, Error>
Produce deterministic canonical JSON bytes from a receipt.
Uses serde’s field-declaration-order serialization for determinism. The resulting bytes are suitable for hashing.
Auto Trait Implementations§
impl Freeze for ReceiptComposer
impl RefUnwindSafe for ReceiptComposer
impl Send for ReceiptComposer
impl Sync for ReceiptComposer
impl Unpin for ReceiptComposer
impl UnsafeUnpin for ReceiptComposer
impl UnwindSafe for ReceiptComposer
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