pub trait PlaintextVectorCreationEngine<Value, PlaintextVector>: AbstractEnginewhere
PlaintextVector: PlaintextVectorEntity,{
fn create_plaintext_vector_from(
&mut self,
values: &[Value]
) -> Result<PlaintextVector, PlaintextVectorCreationError<Self::EngineError>>;
unsafe fn create_plaintext_vector_from_unchecked(
&mut self,
values: &[Value]
) -> PlaintextVector;
}
Expand description
A trait for engines creating plaintext vectors from arbitrary values.
Semantics
This pure operation generates a plaintext vector from the values
slice of arbitrary values. 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
sourcefn create_plaintext_vector_from(
&mut self,
values: &[Value]
) -> Result<PlaintextVector, PlaintextVectorCreationError<Self::EngineError>>
fn create_plaintext_vector_from(
&mut self,
values: &[Value]
) -> Result<PlaintextVector, PlaintextVectorCreationError<Self::EngineError>>
Creates a plaintext vector from a slice of arbitrary values.
sourceunsafe fn create_plaintext_vector_from_unchecked(
&mut self,
values: &[Value]
) -> PlaintextVector
unsafe fn create_plaintext_vector_from_unchecked(
&mut self,
values: &[Value]
) -> PlaintextVector
Unsafely creates a plaintext vector from a slice of arbitrary values.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of PlaintextVectorCreationError
. For safety concerns specific to an engine, refer to
the implementer safety section.
Implementors
impl PlaintextVectorCreationEngine<u32, PlaintextVector32> for DefaultEngine
Description:
Implementation of PlaintextVectorCreationEngine
for DefaultEngine
that operates on
32 bits integers.
impl PlaintextVectorCreationEngine<u64, PlaintextVector64> for DefaultEngine
Description:
Implementation of PlaintextVectorCreationEngine
for DefaultEngine
that operates on
64 bits integers.