Struct StorageBuilder
pub struct StorageBuilder<'k, T> { /* private fields */ }Implementations§
§impl<'k, T> StorageBuilder<'k, T>
impl<'k, T> StorageBuilder<'k, T>
pub fn new(source: T, key: &'k IndexKey, keyset_id: Uuid) -> Self
pub fn index_with<I>(self, index: I) -> Result<Self, EncryptionError>where
for<'t> I: Indexes<'t, T>,
pub fn with_descriptor(self, descriptor: impl Into<String>) -> Self
pub fn with_context(self, context: Context) -> Self
pub fn with_context(self, context: Context) -> Self
Adds context to the record.
pub fn set_context(self, context: Cow<'k, [Context]>) -> Self
pub fn set_context(self, context: Cow<'k, [Context]>) -> Self
Sets the context for the record (replacing any existing context).
pub fn keyset_id(&self) -> Uuid
pub fn descriptor(&self) -> &str
pub fn descriptor(&self) -> &str
Gets the descriptor. An empty string is returned if a descriptor has not been set or if the underlying data is
an SteVec.
Encrypted::SteVec(_) cannot currently have a descriptor set on it, so if one were to be encrypted using a descriptor then decryption would use an empty string which would cause decryption to fail.
This is a limitation of the implementation: an SteVec should have a descriptor but changing it without an
EQL upgrade with a mandatory migration process would break existing encrypted data.
pub fn to_index_terms(self) -> Vec<IndexTerm>
Auto Trait Implementations§
impl<'k, T> Freeze for StorageBuilder<'k, T>where
T: Freeze,
impl<'k, T> RefUnwindSafe for StorageBuilder<'k, T>where
T: RefUnwindSafe,
impl<'k, T> Send for StorageBuilder<'k, T>where
T: Send,
impl<'k, T> Sync for StorageBuilder<'k, T>where
T: Sync,
impl<'k, T> Unpin for StorageBuilder<'k, T>where
T: Unpin,
impl<'k, T> UnsafeUnpin for StorageBuilder<'k, T>where
T: UnsafeUnpin,
impl<'k, T> UnwindSafe for StorageBuilder<'k, T>where
T: UnwindSafe,
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