Struct PreparedPlaintext
pub struct PreparedPlaintext<'a> { /* private fields */ }Expand description
A prepared plaintext value ready for EQL encryption.
PreparedPlaintext bundles together all the information needed to encrypt a plaintext value
into an EQL payload: the value itself, its location identifier (table/column), the operation
to perform (storage or query), and the column’s encryption configuration.
§Fields
identifier- The table and column this plaintext belongs toplaintext- The actual plaintext value to encrypteql_op- Whether to encrypt for storage or generate a query payloadcolumn_config- The encryption configuration for this column
§Examples
use cipherstash_client::eql::{PreparedPlaintext, Identifier, EqlOperation};
use cipherstash_client::encryption::Plaintext;
use std::borrow::Cow;
let identifier = Identifier::new("users", "email");
let plaintext = Plaintext::Text(Some("user@example.com".into()));
let prepared = PreparedPlaintext::new(
Cow::Owned(column_config),
identifier,
plaintext,
EqlOperation::Store,
);Implementations§
§impl<'a> PreparedPlaintext<'a>
impl<'a> PreparedPlaintext<'a>
pub fn new(
column_config: Cow<'a, ColumnConfig>,
identifier: Identifier,
plaintext: Plaintext,
eql_op: EqlOperation<'a>,
) -> Self
pub fn new( column_config: Cow<'a, ColumnConfig>, identifier: Identifier, plaintext: Plaintext, eql_op: EqlOperation<'a>, ) -> Self
Constructs a PreparedPlaintext from its component parts. See the
type-level docs for an example.
Auto Trait Implementations§
impl<'a> Freeze for PreparedPlaintext<'a>
impl<'a> RefUnwindSafe for PreparedPlaintext<'a>
impl<'a> Send for PreparedPlaintext<'a>
impl<'a> Sync for PreparedPlaintext<'a>
impl<'a> Unpin for PreparedPlaintext<'a>
impl<'a> UnsafeUnpin for PreparedPlaintext<'a>
impl<'a> UnwindSafe for PreparedPlaintext<'a>
Blanket Implementations§
impl<T> AuthStrategyBounds for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more