Struct xstack::MemoryKeyStore
source · pub struct MemoryKeyStore(/* private fields */);Expand description
In-memory KeyStore implementation with random key generation on startup.
Also, you can create a MemoryKeyStore from Keypair:
use xstack::{Switch, MemoryKeyStore, identity::Keypair};
Switch::new("test")
.keystore(MemoryKeyStore::from(Keypair::generate_ed25519()))
.transport_bind(["/ip4/127.0.0.1/tcp/0"])
.create()
.await
.unwrap()
// register to global context.
.into_global();Implementations§
Trait Implementations§
source§impl DriverKeyStore for MemoryKeyStore
impl DriverKeyStore for MemoryKeyStore
Auto Trait Implementations§
impl Freeze for MemoryKeyStore
impl RefUnwindSafe for MemoryKeyStore
impl Send for MemoryKeyStore
impl Sync for MemoryKeyStore
impl Unpin for MemoryKeyStore
impl UnwindSafe for MemoryKeyStore
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