pub struct FileKeyStorage { /* private fields */ }๐Deprecated:
Will be extracted to mockforge-workspace crate
Expand description
File-based key storage implementation
Implementationsยง
Sourceยงimpl FileKeyStorage
impl FileKeyStorage
Sourcepub fn new() -> Self
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn new() -> Self
Will be extracted to mockforge-workspace crate
Create a new file-based key storage with default path
Sourcepub fn with_path<P: AsRef<Path>>(path: P) -> Self
๐Deprecated: Will be extracted to mockforge-workspace crate
pub fn with_path<P: AsRef<Path>>(path: P) -> Self
Will be extracted to mockforge-workspace crate
Create a new file-based key storage with custom base path
Sourcepub async fn store_key_async(
&mut self,
key_id: &String,
encrypted_key: &[u8],
) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub async fn store_key_async( &mut self, key_id: &String, encrypted_key: &[u8], ) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Store a key asynchronously (non-blocking)
Sourcepub async fn retrieve_key_async(
&self,
key_id: &String,
) -> EncryptionResult<Vec<u8>>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub async fn retrieve_key_async( &self, key_id: &String, ) -> EncryptionResult<Vec<u8>>
Will be extracted to mockforge-workspace crate
Retrieve a key asynchronously (non-blocking)
Sourcepub async fn delete_key_async(
&mut self,
key_id: &String,
) -> EncryptionResult<()>
๐Deprecated: Will be extracted to mockforge-workspace crate
pub async fn delete_key_async( &mut self, key_id: &String, ) -> EncryptionResult<()>
Will be extracted to mockforge-workspace crate
Delete a key asynchronously (non-blocking)
Trait Implementationsยง
Sourceยงimpl Clone for FileKeyStorage
impl Clone for FileKeyStorage
Sourceยงfn clone(&self) -> FileKeyStorage
fn clone(&self) -> FileKeyStorage
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for FileKeyStorage
impl Debug for FileKeyStorage
Sourceยงimpl Default for FileKeyStorage
impl Default for FileKeyStorage
Sourceยงimpl KeyStorage for FileKeyStorage
impl KeyStorage for FileKeyStorage
Sourceยงfn store_key(
&mut self,
key_id: &String,
encrypted_key: &[u8],
) -> EncryptionResult<()>
fn store_key( &mut self, key_id: &String, encrypted_key: &[u8], ) -> EncryptionResult<()>
๐Deprecated:
Will be extracted to mockforge-workspace crate
Store an encrypted key
Sourceยงfn retrieve_key(&self, key_id: &String) -> EncryptionResult<Vec<u8>>
fn retrieve_key(&self, key_id: &String) -> EncryptionResult<Vec<u8>>
๐Deprecated:
Will be extracted to mockforge-workspace crate
Retrieve an encrypted key
Sourceยงfn delete_key(&mut self, key_id: &String) -> EncryptionResult<()>
fn delete_key(&mut self, key_id: &String) -> EncryptionResult<()>
๐Deprecated:
Will be extracted to mockforge-workspace crate
Delete a key
Sourceยงfn key_exists(&self, key_id: &String) -> bool
fn key_exists(&self, key_id: &String) -> bool
๐Deprecated:
Will be extracted to mockforge-workspace crate
Check if a key exists
Auto Trait Implementationsยง
impl Freeze for FileKeyStorage
impl RefUnwindSafe for FileKeyStorage
impl Send for FileKeyStorage
impl Sync for FileKeyStorage
impl Unpin for FileKeyStorage
impl UnsafeUnpin for FileKeyStorage
impl UnwindSafe for FileKeyStorage
Blanket Implementationsยง
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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