PlaintextDecodingEngine

Trait PlaintextDecodingEngine 

Source
pub trait PlaintextDecodingEngine<Encoder, Plaintext, Cleartext>: AbstractEngine
where Plaintext: PlaintextEntity, Cleartext: CleartextEntity, Encoder: EncoderEntity,
{ // Required methods fn decode_plaintext( &mut self, encoder: &Encoder, input: &Plaintext, ) -> Result<Cleartext, PlaintextDecodingError<Self::EngineError>>; unsafe fn decode_plaintext_unchecked( &mut self, input: &Plaintext, encoder: &Encoder, ) -> Cleartext; }
Expand description

A trait for engines decoding plaintexts.

§Semantics

This pure operation generates a cleartext containing the decoding of the input plaintext under the encoder encoder.

§Formal Definition

Required Methods§

Source

fn decode_plaintext( &mut self, encoder: &Encoder, input: &Plaintext, ) -> Result<Cleartext, PlaintextDecodingError<Self::EngineError>>

Decodes a plaintext.

Source

unsafe fn decode_plaintext_unchecked( &mut self, input: &Plaintext, encoder: &Encoder, ) -> Cleartext

Unsafely decodes a plaintext.

§Safety

For the general safety concerns regarding this operation, refer to the different variants of PlaintextDecodingError. For safety concerns specific to an engine, refer to the implementer safety section.

Implementors§

Source§

impl PlaintextDecodingEngine<FloatEncoder, Plaintext32, CleartextF64> for DefaultEngine

§Description:

Implementation of PlaintextDecodingEngine for DefaultEngine that decodes 32 bits integers to 64 bits floating point numbers.

Source§

impl PlaintextDecodingEngine<FloatEncoder, Plaintext64, CleartextF64> for DefaultEngine

§Description:

Implementation of PlaintextDecodingEngine for DefaultEngine that decodes 64 bits integers to 64 bits floating point numbers.