pub struct Plaintext { /* private fields */ }Expand description
An opaque handle to a multi-block plaintext integer in the IR graph.
A Plaintext represents an unencrypted integer stored as a radix-2^message_size
decomposition across multiple PlaintextBlocks. Its PlaintextSpec records the
total integer bit-width and the
per-block layout. Use Builder::plaintext_split to
decompose it into individual blocks.
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 Plaintext
impl Plaintext
Sourcepub fn spec(&self) -> PlaintextSpec
pub fn spec(&self) -> PlaintextSpec
Returns the specification describing the integer bit-width and per-block layout.
Sourcepub fn make_value(&self, val: EmulatedPlaintextStorage) -> IopValue
pub fn make_value(&self, val: EmulatedPlaintextStorage) -> IopValue
Creates a compatible value to be used in evaluation.
The val argument is the integer to be encoded. It is decomposed into
blocks according to this plaintext’s PlaintextSpec.
Trait Implementations§
impl Copy for Plaintext
impl Eq for Plaintext
impl StructuralPartialEq for Plaintext
Auto Trait Implementations§
impl Freeze for Plaintext
impl RefUnwindSafe for Plaintext
impl Send for Plaintext
impl Sync for Plaintext
impl Unpin for Plaintext
impl UnsafeUnpin for Plaintext
impl UnwindSafe for Plaintext
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