pub trait PlaintextDecodingEngine<Encoder, Plaintext, Cleartext>: AbstractEnginewhere
Plaintext: PlaintextEntity,
Cleartext: CleartextEntity,
Encoder: EncoderEntity,{
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
sourcefn decode_plaintext(
&mut self,
encoder: &Encoder,
input: &Plaintext
) -> Result<Cleartext, PlaintextDecodingError<Self::EngineError>>
fn decode_plaintext(
&mut self,
encoder: &Encoder,
input: &Plaintext
) -> Result<Cleartext, PlaintextDecodingError<Self::EngineError>>
Decodes a plaintext.
sourceunsafe fn decode_plaintext_unchecked(
&mut self,
input: &Plaintext,
encoder: &Encoder
) -> Cleartext
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
impl PlaintextDecodingEngine<FloatEncoder, Plaintext32, CleartextF64> for DefaultEngine
Description:
Implementation of PlaintextDecodingEngine
for DefaultEngine
that decodes 32 bits
integers to 64 bits floating point numbers.
impl PlaintextDecodingEngine<FloatEncoder, Plaintext64, CleartextF64> for DefaultEngine
Description:
Implementation of PlaintextDecodingEngine
for DefaultEngine
that decodes 64 bits
integers to 64 bits floating point numbers.