pub trait Viewable {
// Required methods
fn public_input<T: Serialize + DeserializeOwned + Sized>(
&self,
) -> Result<T, IOError>;
fn exit_code(&self) -> Result<u32, IOError>;
fn public_output<U: Serialize + DeserializeOwned + Sized>(
&self,
) -> Result<U, IOError>;
fn associated_data(&self) -> Result<Vec<u8>, IOError>;
fn logs(&self) -> Result<Vec<String>, IOError>;
// Provided methods
fn public_input_digest<T: Serialize + DeserializeOwned + Sized, H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>
where <H as OutputSizeUser>::OutputSize: ArrayLength<u8> { ... }
fn exit_code_digest<H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>
where <H as OutputSizeUser>::OutputSize: ArrayLength<u8> { ... }
fn public_output_digest<U: Serialize + DeserializeOwned + Sized, H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>
where <H as OutputSizeUser>::OutputSize: ArrayLength<u8> { ... }
fn associated_data_digest<H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>
where <H as OutputSizeUser>::OutputSize: ArrayLength<u8> { ... }
}
Expand description
A view of an execution capturing the context needed for proof distribution and verification.
Required Methods§
Sourcefn public_input<T: Serialize + DeserializeOwned + Sized>(
&self,
) -> Result<T, IOError>
fn public_input<T: Serialize + DeserializeOwned + Sized>( &self, ) -> Result<T, IOError>
Deserialize the public input used for the execution.
Sourcefn exit_code(&self) -> Result<u32, IOError>
fn exit_code(&self) -> Result<u32, IOError>
Deserialize the exit code resulting from the execution.
Sourcefn public_output<U: Serialize + DeserializeOwned + Sized>(
&self,
) -> Result<U, IOError>
fn public_output<U: Serialize + DeserializeOwned + Sized>( &self, ) -> Result<U, IOError>
Deserialize the public output resulting from the execution.
Provided Methods§
Sourcefn public_input_digest<T: Serialize + DeserializeOwned + Sized, H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>where
<H as OutputSizeUser>::OutputSize: ArrayLength<u8>,
fn public_input_digest<T: Serialize + DeserializeOwned + Sized, H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>where
<H as OutputSizeUser>::OutputSize: ArrayLength<u8>,
Compute a digest over the public input used for the execution.
Sourcefn exit_code_digest<H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>where
<H as OutputSizeUser>::OutputSize: ArrayLength<u8>,
fn exit_code_digest<H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>where
<H as OutputSizeUser>::OutputSize: ArrayLength<u8>,
Compute a digest over the public output resulting from the execution.
Sourcefn public_output_digest<U: Serialize + DeserializeOwned + Sized, H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>where
<H as OutputSizeUser>::OutputSize: ArrayLength<u8>,
fn public_output_digest<U: Serialize + DeserializeOwned + Sized, H: Digest>(
&self,
) -> Result<GenericArray<u8, H::OutputSize>, IOError>where
<H as OutputSizeUser>::OutputSize: ArrayLength<u8>,
Compute a digest over the public output resulting from the execution.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl Viewable for View
impl Viewable for View
Source§fn public_input<T: Serialize + DeserializeOwned + Sized>(
&self,
) -> Result<T, IOError>
fn public_input<T: Serialize + DeserializeOwned + Sized>( &self, ) -> Result<T, IOError>
Deserialize the public input used for the execution.
Source§fn exit_code(&self) -> Result<u32, IOError>
fn exit_code(&self) -> Result<u32, IOError>
Deserialize the exit code resulting from the execution.
Source§fn public_output<U: Serialize + DeserializeOwned + Sized>(
&self,
) -> Result<U, IOError>
fn public_output<U: Serialize + DeserializeOwned + Sized>( &self, ) -> Result<U, IOError>
Deserialize the public output resulting from the execution.