struct WriteContext {
payload: Vec<u8>,
sections: Vec<SectionEntry>,
payload_base: u64,
}Expand description
Context tracked during a cache-write to record sections in parallel with the growing payload buffer.
Fields§
§payload: Vec<u8>§sections: Vec<SectionEntry>§payload_base: u64File offset where payload section bytes will start. Set once the preamble + ScalarHeader + section table size is known.
Implementations§
Source§impl WriteContext
impl WriteContext
fn new() -> Self
Sourcefn push_field_section<F: PrimeField>(
&mut self,
tag: u32,
domain_size: u32,
data: &[F],
)
fn push_field_section<F: PrimeField>( &mut self, tag: u32, domain_size: u32, data: &[F], )
Append a field-slice payload, record a SectionEntry, and apply
trailing alignment padding so the next section starts 32-byte
aligned.
fn push_raw_section(&mut self, tag: u32, payload: &[u8])
Sourcefn push_raw_section_with_elem_count(
&mut self,
tag: u32,
elem_domain_size: u32,
payload: &[u8],
)
fn push_raw_section_with_elem_count( &mut self, tag: u32, elem_domain_size: u32, payload: &[u8], )
Like [push_raw_section] but records a caller-supplied value in the
section-table entry’s elem_domain_size. Used by lookup_table8,
which encodes the count of inner evaluation arrays there rather
than inline in the payload (inline would break the 32-byte
alignment required for zero-copy field-element reads).
Auto Trait Implementations§
impl Freeze for WriteContext
impl RefUnwindSafe for WriteContext
impl Send for WriteContext
impl Sync for WriteContext
impl Unpin for WriteContext
impl UnsafeUnpin for WriteContext
impl UnwindSafe for WriteContext
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