pub trait CleartextEncodingEngine<Encoder, Cleartext, Plaintext>: AbstractEnginewhere
    Encoder: EncoderEntity,
    Cleartext: CleartextEntity,
    Plaintext: PlaintextEntity,
{ fn encode_cleartext(
        &mut self,
        encoder: &Encoder,
        cleartext: &Cleartext
    ) -> Result<Plaintext, CleartextEncodingError<Self::EngineError>>; unsafe fn encode_cleartext_unchecked(
        &mut self,
        encoder: &Encoder,
        cleartext: &Cleartext
    ) -> Plaintext; }
Expand description

A trait for engines encoding cleartexts.

Semantics

This pure operation generates a plaintext containing the encoding of the cleartext cleartext, under the encoder encoder.

Formal Definition

Required Methods

Encodes a cleartext into a plaintext.

Unsafely encodes a cleartext into a plaintext.

Safety

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

Implementors

Description:

Implementation of CleartextEncodingEngine for DefaultEngine that encodes 64 bits floating point numbers to 32 bits integers.

Description:

Implementation of CleartextEncodingEngine for DefaultEngine that encodes 64 bits floating point numbers to 32 bits integers.