pub struct Claim {
pub program_digest: Digest,
pub input: Vec<BFieldElement>,
pub output: Vec<BFieldElement>,
}Expand description
Contains the public information of a verifiably correct computation.
A corresponding Proof is needed to verify the computation.
One additional piece of public information not explicitly listed in the Claim is the
padded_height, an upper bound on the length of the computation.
It is derivable from a Proof by calling Proof::padded_height().
Fields§
§program_digest: DigestThe hash digest of the program that was executed. The hash function in use is Tip5.
input: Vec<BFieldElement>The public input to the computation.
output: Vec<BFieldElement>The public output of the computation.
Implementations§
source§impl Claim
impl Claim
pub fn new(program_digest: Digest) -> Self
pub fn about_program(program: &Program) -> Self
pub fn with_input(self, input: Vec<BFieldElement>) -> Self
pub fn with_output(self, output: Vec<BFieldElement>) -> Self
Trait Implementations§
source§impl<'arbitrary> Arbitrary<'arbitrary> for Claim
impl<'arbitrary> Arbitrary<'arbitrary> for Claim
source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the given unstructured data. Read moresource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self from the entirety of the given
unstructured data. Read moresource§impl BFieldCodec for Claim
impl BFieldCodec for Claim
type Error = ClaimBFieldDecodingError
fn decode(sequence: &[BFieldElement]) -> Result<Box<Self>, Self::Error>
fn encode(&self) -> Vec<BFieldElement>
source§fn static_length() -> Option<usize>
fn static_length() -> Option<usize>
Returns the length in number of BFieldElements if it is known at compile-time.
Otherwise, None.
source§impl<'de> Deserialize<'de> for Claim
impl<'de> Deserialize<'de> for Claim
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 GetSize for Claim
impl GetSize for Claim
source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Determines how many bytes this object occupies inside the heap. Read more
source§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Determines how may bytes this object occupies inside the stack. Read more
source§impl PartialEq for Claim
impl PartialEq for Claim
impl Eq for Claim
impl StructuralPartialEq for Claim
Auto Trait Implementations§
impl Freeze for Claim
impl RefUnwindSafe for Claim
impl Send for Claim
impl Sync for Claim
impl Unpin for Claim
impl UnwindSafe for Claim
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more