Struct libp2p_kad::record::store::MemoryStore [−][src]
pub struct MemoryStore { /* fields omitted */ }
In-memory implementation of a RecordStore
.
Implementations
impl MemoryStore
[src]
impl MemoryStore
[src]pub fn new(local_id: PeerId) -> Self
[src][−]
Creates a new MemoryRecordStore
with a default configuration.
pub fn with_config(local_id: PeerId, config: MemoryStoreConfig) -> Self
[src][−]
Creates a new MemoryRecordStore
with the given configuration.
pub fn retain<F>(&mut self, f: F) where
F: FnMut(&Key, &mut Record) -> bool,
[src][−]
F: FnMut(&Key, &mut Record) -> bool,
Retains the records satisfying a predicate.
Trait Implementations
impl<'a> RecordStore<'a> for MemoryStore
[src]
impl<'a> RecordStore<'a> for MemoryStore
[src]