pub trait CleartextRetrievalEngine<Cleartext, Value>: AbstractEngine where
Cleartext: CleartextEntity, {
fn retrieve_cleartext(
&mut self,
cleartext: &Cleartext
) -> Result<Value, CleartextRetrievalError<Self::EngineError>>;
unsafe fn retrieve_cleartext_unchecked(
&mut self,
cleartext: &Cleartext
) -> Value;
}
Expand description
A trait for engines retrieving arbitrary values from cleartexts.
Semantics
This pure operation generates an arbitrary value from the
cleartext
cleartext. 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_cleartext(
&mut self,
cleartext: &Cleartext
) -> Result<Value, CleartextRetrievalError<Self::EngineError>>
fn retrieve_cleartext(
&mut self,
cleartext: &Cleartext
) -> Result<Value, CleartextRetrievalError<Self::EngineError>>
Retrieves an arbitrary value from a cleartext.
unsafe fn retrieve_cleartext_unchecked(&mut self, cleartext: &Cleartext) -> Value
unsafe fn retrieve_cleartext_unchecked(&mut self, cleartext: &Cleartext) -> Value
Unsafely retrieves an arbitrary value from a cleartext.
Safety
For the general safety concerns regarding this operation, refer to the different variants
of CleartextRetrievalError
. For safety concerns specific to an engine, refer to the
implementer safety section.
Implementors
impl CleartextRetrievalEngine<Cleartext32, u32> for DefaultEngine
Description:
Implementation of CleartextRetrievalEngine
for DefaultEngine
that operates on 32 bits
integers.
impl CleartextRetrievalEngine<Cleartext64, u64> for DefaultEngine
Description:
Implementation of CleartextRetrievalEngine
for DefaultEngine
that operates on 64 bits
integers.
impl CleartextRetrievalEngine<CleartextF64, f64> for DefaultEngine
Description:
Implementation of CleartextRetrievalEngine
for DefaultEngine
that operates on 64 bits
floating point numbers.