pub trait CleartextCreationEngine<Value, Cleartext>: AbstractEngine where
Cleartext: CleartextEntity, {
fn create_cleartext(
&mut self,
value: &Value
) -> Result<Cleartext, CleartextCreationError<Self::EngineError>>;
unsafe fn create_cleartext_unchecked(&mut self, value: &Value) -> Cleartext;
}
Expand description
A trait for engines creating cleartexts from arbitrary values.
Semantics
This pure operation generates a cleartext from the value
arbitrary value. 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 create_cleartext(
&mut self,
value: &Value
) -> Result<Cleartext, CleartextCreationError<Self::EngineError>>
fn create_cleartext(
&mut self,
value: &Value
) -> Result<Cleartext, CleartextCreationError<Self::EngineError>>
Creates a cleartext from an arbitrary value.
unsafe fn create_cleartext_unchecked(&mut self, value: &Value) -> Cleartext
unsafe fn create_cleartext_unchecked(&mut self, value: &Value) -> Cleartext
Unsafely creates a cleartext from an arbitrary value.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of CleartextCreationError
. For safety concerns specific to an
engine, refer to the implementer safety section.
Implementors
Description:
Implementation of CleartextCreationEngine
for CoreEngine
that operates on 32 bits
integers.
Description:
Implementation of CleartextCreationEngine
for CoreEngine
that operates on 64 bits
integers.