Struct radicle_keystore::memory::MemoryStorage
source · [−]pub struct MemoryStorage<C: Crypto, PK, SK, M> { /* private fields */ }
Expand description
Keystore
implementation which stores the encrypted key in memory.
This is provided mainly for testing in environments where hitting the
filesystem is undesirable, and otherwise equivalent to FileStorage
.
Implementations
sourceimpl<C: Crypto, PK, SK, M> MemoryStorage<C, PK, SK, M>
impl<C: Crypto, PK, SK, M> MemoryStorage<C, PK, SK, M>
Trait Implementations
sourceimpl<C, PK, SK, M> Keystore for MemoryStorage<C, PK, SK, M> where
C: Crypto,
C::Error: Display + Debug,
C::SecretBox: Clone,
SK: AsRef<[u8]> + SecretKeyExt<Metadata = M>,
<SK as SecretKeyExt>::Error: Display + Debug,
PK: Clone + From<SK>,
M: Clone,
impl<C, PK, SK, M> Keystore for MemoryStorage<C, PK, SK, M> where
C: Crypto,
C::Error: Display + Debug,
C::SecretBox: Clone,
SK: AsRef<[u8]> + SecretKeyExt<Metadata = M>,
<SK as SecretKeyExt>::Error: Display + Debug,
PK: Clone + From<SK>,
M: Clone,
type PublicKey = PK
type SecretKey = SK
type Metadata = M
type Error = Error<C::Error, <SK as SecretKeyExt>::Error>
sourcefn put_key(&mut self, key: Self::SecretKey) -> Result<(), Self::Error>
fn put_key(&mut self, key: Self::SecretKey) -> Result<(), Self::Error>
Securely store secret key key
in the keystore. Read more
Auto Trait Implementations
impl<C, PK, SK, M> RefUnwindSafe for MemoryStorage<C, PK, SK, M> where
C: RefUnwindSafe,
M: RefUnwindSafe,
PK: RefUnwindSafe,
SK: RefUnwindSafe,
<C as Crypto>::SecretBox: RefUnwindSafe,
impl<C, PK, SK, M> Send for MemoryStorage<C, PK, SK, M> where
C: Send,
M: Send,
PK: Send,
SK: Send,
<C as Crypto>::SecretBox: Send,
impl<C, PK, SK, M> Sync for MemoryStorage<C, PK, SK, M> where
C: Sync,
M: Sync,
PK: Sync,
SK: Sync,
<C as Crypto>::SecretBox: Sync,
impl<C, PK, SK, M> Unpin for MemoryStorage<C, PK, SK, M> where
C: Unpin,
M: Unpin,
PK: Unpin,
SK: Unpin,
<C as Crypto>::SecretBox: Unpin,
impl<C, PK, SK, M> UnwindSafe for MemoryStorage<C, PK, SK, M> where
C: UnwindSafe,
M: UnwindSafe,
PK: UnwindSafe,
SK: UnwindSafe,
<C as Crypto>::SecretBox: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more