pub struct InMemoryKeyStore { /* private fields */ }Implementations§
Source§impl InMemoryKeyStore
impl InMemoryKeyStore
pub fn empty() -> Self
pub fn set_key(&mut self, key_id: u8, key: [u8; 32])
Sourcepub fn set_key_encoded(
&mut self,
key_id: u8,
key_encoded: &str,
) -> Result<(), KeyStoreError>
pub fn set_key_encoded( &mut self, key_id: u8, key_encoded: &str, ) -> Result<(), KeyStoreError>
Accepts either:
- hex: 64 hex characters representing 32 bytes
- base64: decodes to exactly 32 bytes, with or without padding
pub fn remove_key(&mut self, key_id: u8) -> Result<(), KeyStoreError>
pub fn contains_key(&self, key_id: u8) -> bool
Trait Implementations§
Source§impl Debug for InMemoryKeyStore
impl Debug for InMemoryKeyStore
Auto Trait Implementations§
impl Freeze for InMemoryKeyStore
impl RefUnwindSafe for InMemoryKeyStore
impl Send for InMemoryKeyStore
impl Sync for InMemoryKeyStore
impl Unpin for InMemoryKeyStore
impl UnsafeUnpin for InMemoryKeyStore
impl UnwindSafe for InMemoryKeyStore
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