pub struct InMemorySigKeyDb { /* private fields */ }Expand description
An in-memory database for storing signing keys. Uses hashmap. Should only be used for testing.
Implementations§
Trait Implementations§
Source§impl SigKeyDb for InMemorySigKeyDb
impl SigKeyDb for InMemorySigKeyDb
fn insert_key(&mut self, t: u128, sig_key: Sigkey)
Source§fn remove_key(&mut self, t: u128)
fn remove_key(&mut self, t: u128)
Removes key from database and zeroes it out
fn has_key(&self, t: u128) -> bool
fn get_key(&self, t: u128) -> Result<&Sigkey, PixelError>
Source§fn get_key_indices(&self) -> HashSet<u128>
fn get_key_indices(&self) -> HashSet<u128>
Returns indices (time periods) for all present keys
Auto Trait Implementations§
impl Freeze for InMemorySigKeyDb
impl RefUnwindSafe for InMemorySigKeyDb
impl Send for InMemorySigKeyDb
impl Sync for InMemorySigKeyDb
impl Unpin for InMemorySigKeyDb
impl UnsafeUnpin for InMemorySigKeyDb
impl UnwindSafe for InMemorySigKeyDb
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> 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