pub enum UnderflowIO {
Read(BFieldElement),
Write(BFieldElement),
}
Expand description
Indicates changes to the op-stack underflow memory.
Variants§
Read(BFieldElement)
Write(BFieldElement)
Implementations§
Source§impl UnderflowIO
impl UnderflowIO
Sourcepub fn canonicalize_sequence(sequence: &mut Vec<Self>)
pub fn canonicalize_sequence(sequence: &mut Vec<Self>)
Remove spurious read/write sequences arising from temporary stack changes.
For example, the sequence [Read(5), Write(5), Read(7)]
can be replaced with [Read(7)]
.
Similarly, the sequence [Write(5), Write(3), Read(3), Read(5), Write(7)]
can be replaced
with [Write(7)]
.
Sourcepub fn is_uniform_sequence(sequence: &[Self]) -> bool
pub fn is_uniform_sequence(sequence: &[Self]) -> bool
Whether the sequence of underflow IOs consists of either only reads or only writes.
Sourcepub fn is_writing_sequence(sequence: &[Self]) -> bool
pub fn is_writing_sequence(sequence: &[Self]) -> bool
Whether the sequence of underflow IOs consists of only writes.
Sourcepub fn is_reading_sequence(sequence: &[Self]) -> bool
pub fn is_reading_sequence(sequence: &[Self]) -> bool
Whether the sequence of underflow IOs consists of only reads.
pub fn shrinks_stack(&self) -> bool
pub fn grows_stack(&self) -> bool
pub fn payload(self) -> BFieldElement
Trait Implementations§
Source§impl<'arbitrary> Arbitrary<'arbitrary> for UnderflowIO
impl<'arbitrary> Arbitrary<'arbitrary> for UnderflowIO
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§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl Clone for UnderflowIO
impl Clone for UnderflowIO
Source§fn clone(&self) -> UnderflowIO
fn clone(&self) -> UnderflowIO
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 UnderflowIO
impl Debug for UnderflowIO
Source§impl<'de> Deserialize<'de> for UnderflowIO
impl<'de> Deserialize<'de> for UnderflowIO
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 UnderflowIO
impl GetSize for UnderflowIO
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 Hash for UnderflowIO
impl Hash for UnderflowIO
Source§impl PartialEq for UnderflowIO
impl PartialEq for UnderflowIO
Source§impl Serialize for UnderflowIO
impl Serialize for UnderflowIO
impl Copy for UnderflowIO
impl Eq for UnderflowIO
impl StructuralPartialEq for UnderflowIO
Auto Trait Implementations§
impl Freeze for UnderflowIO
impl RefUnwindSafe for UnderflowIO
impl Send for UnderflowIO
impl Sync for UnderflowIO
impl Unpin for UnderflowIO
impl UnwindSafe for UnderflowIO
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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