pub trait PlaintextVectorRetrievalEngine<PlaintextVector, Value>: AbstractEngine where
PlaintextVector: PlaintextVectorEntity, {
fn retrieve_plaintext_vector(
&mut self,
plaintext: &PlaintextVector
) -> Result<Vec<Value>, PlaintextVectorRetrievalError<Self::EngineError>>;
unsafe fn retrieve_plaintext_vector_unchecked(
&mut self,
plaintext: &PlaintextVector
) -> Vec<Value>;
}
Expand description
A trait for engines retrieving arbitrary values from plaintext vectors.
Semantics
This pure operation generates a vec of arbitrary values from the
input
plaintext vector. 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
fn retrieve_plaintext_vector(
&mut self,
plaintext: &PlaintextVector
) -> Result<Vec<Value>, PlaintextVectorRetrievalError<Self::EngineError>>
fn retrieve_plaintext_vector(
&mut self,
plaintext: &PlaintextVector
) -> Result<Vec<Value>, PlaintextVectorRetrievalError<Self::EngineError>>
Retrieves arbitrary values from a plaintext vector.
unsafe fn retrieve_plaintext_vector_unchecked(
&mut self,
plaintext: &PlaintextVector
) -> Vec<Value>
unsafe fn retrieve_plaintext_vector_unchecked(
&mut self,
plaintext: &PlaintextVector
) -> Vec<Value>
Unsafely retrieves arbitrary values from a plaintext vector.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of PlaintextVectorRetrievalError
. For safety concerns specific to an engine, refer to
the implementer safety section.
Implementors
Description:
Implementation of PlaintextVectorRetrievalEngine
for CoreEngine
that operates on 32 bits
integers.
Description:
Implementation of PlaintextVectorRetrievalEngine
for CoreEngine
that operates on 64 bits
integers.