pub struct WitnessStack<F> {
stack: Vec<StackItem<F>>,
}Expand description
An ordered set of witness maps for separate circuits
Fields§
§stack: Vec<StackItem<F>>Implementations§
Source§impl<F> WitnessStack<F>
impl<F> WitnessStack<F>
Sourcepub fn push(&mut self, index: u32, witness: WitnessMap<F>)
pub fn push(&mut self, index: u32, witness: WitnessMap<F>)
Append an element to the top of the stack
Sourcepub fn pop(&mut self) -> Option<StackItem<F>>
pub fn pop(&mut self) -> Option<StackItem<F>>
Removes the top element from the stack and return its
Source§impl<F: AcirField + Serialize> WitnessStack<F>
impl<F: AcirField + Serialize> WitnessStack<F>
Source§impl<F: AcirField + for<'a> Deserialize<'a>> WitnessStack<F>
impl<F: AcirField + for<'a> Deserialize<'a>> WitnessStack<F>
Sourcepub fn deserialize(buf: &[u8]) -> Result<Self, WitnessStackError>
pub fn deserialize(buf: &[u8]) -> Result<Self, WitnessStackError>
Decompress and deserialize.
Trait Implementations§
Source§impl<F: Clone> Clone for WitnessStack<F>
impl<F: Clone> Clone for WitnessStack<F>
Source§fn clone(&self) -> WitnessStack<F>
fn clone(&self) -> WitnessStack<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 WitnessStack<F>
impl<F: Debug> Debug for WitnessStack<F>
Source§impl<F: Default> Default for WitnessStack<F>
impl<F: Default> Default for WitnessStack<F>
Source§fn default() -> WitnessStack<F>
fn default() -> WitnessStack<F>
Returns the “default value” for a type. Read more
Source§impl<'de, F> Deserialize<'de> for WitnessStack<F>where
F: Deserialize<'de>,
impl<'de, F> Deserialize<'de> for WitnessStack<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> From<WitnessMap<F>> for WitnessStack<F>
impl<F> From<WitnessMap<F>> for WitnessStack<F>
Source§fn from(witness: WitnessMap<F>) -> Self
fn from(witness: WitnessMap<F>) -> Self
Converts to this type from the input type.
Source§impl<F: Hash> Hash for WitnessStack<F>
impl<F: Hash> Hash for WitnessStack<F>
Source§impl<F: Ord> Ord for WitnessStack<F>
impl<F: Ord> Ord for WitnessStack<F>
Source§fn cmp(&self, other: &WitnessStack<F>) -> Ordering
fn cmp(&self, other: &WitnessStack<F>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F: PartialEq> PartialEq for WitnessStack<F>
impl<F: PartialEq> PartialEq for WitnessStack<F>
Source§impl<F: PartialOrd> PartialOrd for WitnessStack<F>
impl<F: PartialOrd> PartialOrd for WitnessStack<F>
Source§impl<F> Serialize for WitnessStack<F>where
F: Serialize,
impl<F> Serialize for WitnessStack<F>where
F: Serialize,
impl<F: Eq> Eq for WitnessStack<F>
impl<F> StructuralPartialEq for WitnessStack<F>
Auto Trait Implementations§
impl<F> Freeze for WitnessStack<F>
impl<F> RefUnwindSafe for WitnessStack<F>where
F: RefUnwindSafe,
impl<F> Send for WitnessStack<F>where
F: Send,
impl<F> Sync for WitnessStack<F>where
F: Sync,
impl<F> Unpin for WitnessStack<F>
impl<F> UnwindSafe for WitnessStack<F>where
F: RefUnwindSafe,
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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