pub struct PlaintextBlock { /* private fields */ }Expand description
An opaque handle to a single plaintext block (radix digit) in the IR graph.
A plaintext block is the cleartext counterpart of a CiphertextBlock: it represents
one digit in the same radix-2^message_size decomposition, but carries only the
message_size message bits — no carry or padding. Plaintext blocks are used as the
right-hand operand in mixed ciphertext–plaintext arithmetic
(e.g. Builder::block_add_plaintext).
This type cannot be constructed directly — it is always returned by
Builder methods. Use make_value to create a test
IopValue for Builder::eval.
Implementations§
Source§impl PlaintextBlock
impl PlaintextBlock
Sourcepub fn spec(&self) -> PlaintextBlockSpec
pub fn spec(&self) -> PlaintextBlockSpec
Returns the block specification describing the message bit layout.
Sourcepub fn make_value(&self, val: EmulatedPlaintextBlockStorage) -> IopValue
pub fn make_value(&self, val: EmulatedPlaintextBlockStorage) -> IopValue
Creates a compatible value to be used in evaluation.
The val argument is a raw message-only value. It is interpreted according to this
block’s PlaintextBlockSpec.
§Panics
Panics if val overflows the message bit width.
Trait Implementations§
Source§impl AsRef<PlaintextBlock> for PlaintextBlock
impl AsRef<PlaintextBlock> for PlaintextBlock
Source§fn as_ref(&self) -> &PlaintextBlock
fn as_ref(&self) -> &PlaintextBlock
Source§impl Clone for PlaintextBlock
impl Clone for PlaintextBlock
Source§fn clone(&self) -> PlaintextBlock
fn clone(&self) -> PlaintextBlock
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more