pub trait PlaintextRetrievalEngine<Plaintext, Value>: AbstractEngine where
    Plaintext: PlaintextEntity
{ fn retrieve_plaintext(
        &mut self,
        plaintext: &Plaintext
    ) -> Result<Value, PlaintextRetrievalError<Self::EngineError>>; unsafe fn retrieve_plaintext_unchecked(
        &mut self,
        plaintext: &Plaintext
    ) -> Value; }
Expand description

A trait for engines retrieving arbitrary values from plaintexts.

Semantics

This pure operation generates an arbitrary value from the plaintext plaintext. By arbitrary here, we mean that Value can be any type that suits the backend implementor (an integer, a struct wrapping integers, a struct wrapping foreign data or any other thing).

Formal Definition

Required Methods

Retrieves an arbitrary value from a plaintext.

Unsafely retrieves an arbitrary value from a plaintext.

Safety

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

Implementors

Description:

Implementation of PlaintextRetrievalEngine for DefaultEngine that operates on 64 bits integers.

Description:

Implementation of PlaintextRetrievalEngine for DefaultEngine that operates on 64 bits integers.