Struct risc0_zkvm::ReceiptMetadata
source · pub struct ReceiptMetadata {
pub pre: SystemState,
pub post: SystemState,
pub exit_code: ExitCode,
pub input: Digest,
pub output: Digest,
}
Expand description
Data associated with a receipt which is used for both input and output of global state.
Fields§
§pre: SystemState
The SystemState of a segment just before execution has begun.
post: SystemState
The SystemState of a segment just after execution has completed.
exit_code: ExitCode
The exit code for a segment
input: Digest
A Digest of the input, from the viewpoint of the guest.
output: Digest
A Digest of the journal, from the viewpoint of the guest.
Implementations§
source§impl ReceiptMetadata
impl ReceiptMetadata
sourcepub fn decode(flat: &mut VecDeque<u32>) -> Result<Self, VerificationError>
pub fn decode(flat: &mut VecDeque<u32>) -> Result<Self, VerificationError>
Decode a crate::ReceiptMetadata from a list of u32’s
sourcepub fn encode(&self, flat: &mut Vec<u32>) -> Result<(), VerificationError>
pub fn encode(&self, flat: &mut Vec<u32>) -> Result<(), VerificationError>
Encode a crate::ReceiptMetadata to a list of u32’s
sourcepub fn digest(&self) -> Result<Digest, VerificationError>
pub fn digest(&self) -> Result<Digest, VerificationError>
Hash the crate::ReceiptMetadata to get a digest of the struct.
Trait Implementations§
source§impl Clone for ReceiptMetadata
impl Clone for ReceiptMetadata
source§fn clone(&self) -> ReceiptMetadata
fn clone(&self) -> ReceiptMetadata
Returns a copy 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 ReceiptMetadata
impl Debug for ReceiptMetadata
source§impl<'de> Deserialize<'de> for ReceiptMetadata
impl<'de> Deserialize<'de> for ReceiptMetadata
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
source§impl PartialEq for ReceiptMetadata
impl PartialEq for ReceiptMetadata
source§fn eq(&self, other: &ReceiptMetadata) -> bool
fn eq(&self, other: &ReceiptMetadata) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ReceiptMetadata
impl Serialize for ReceiptMetadata
impl StructuralPartialEq for ReceiptMetadata
Auto Trait Implementations§
impl RefUnwindSafe for ReceiptMetadata
impl Send for ReceiptMetadata
impl Sync for ReceiptMetadata
impl Unpin for ReceiptMetadata
impl UnwindSafe for ReceiptMetadata
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