pub struct AssertionPayload<F> {
pub error_selector: u64,
pub payload: Vec<ExpressionOrMemory<F>>,
}Expand description
Payload tied to an assertion failure. This data allows users to specify feedback upon a constraint not being satisfied in the circuit.
Fields§
§error_selector: u64Selector that maps a hash of either a constant string or an internal compiler error type to an ABI type. The ABI type should then be used to appropriately resolve the payload data.
payload: Vec<ExpressionOrMemory<F>>The dynamic payload data.
Upon fetching the appropriate ABI type from the error_selector, the values
in this payload can be decoded into the given ABI type.
The payload is expected to be empty in the case of a constant string
as the string can be contained entirely within the error type and ABI type.
Trait Implementations§
Source§impl<F: Clone> Clone for AssertionPayload<F>
impl<F: Clone> Clone for AssertionPayload<F>
Source§fn clone(&self) -> AssertionPayload<F>
fn clone(&self) -> AssertionPayload<F>
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<F: Debug> Debug for AssertionPayload<F>
impl<F: Debug> Debug for AssertionPayload<F>
Source§impl<'de, F> Deserialize<'de> for AssertionPayload<F>where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for AssertionPayload<F>where
F: Deserialize<'de>,
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<F: Hash> Hash for AssertionPayload<F>
impl<F: Hash> Hash for AssertionPayload<F>
Source§impl<F: PartialEq> PartialEq for AssertionPayload<F>
impl<F: PartialEq> PartialEq for AssertionPayload<F>
Source§impl<F> Serialize for AssertionPayload<F>where
F: Serialize,
impl<F> Serialize for AssertionPayload<F>where
F: Serialize,
impl<F: Eq> Eq for AssertionPayload<F>
impl<F> StructuralPartialEq for AssertionPayload<F>
Auto Trait Implementations§
impl<F> Freeze for AssertionPayload<F>
impl<F> RefUnwindSafe for AssertionPayload<F>where
F: RefUnwindSafe,
impl<F> Send for AssertionPayload<F>where
F: Send,
impl<F> Sync for AssertionPayload<F>where
F: Sync,
impl<F> Unpin for AssertionPayload<F>where
F: Unpin,
impl<F> UnwindSafe for AssertionPayload<F>where
F: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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