Module memory_store

Available on crate feature peer-store only.
Expand description

An in-memory Store implementation.

§Usage

use libp2p_peer_store::{memory_store::MemoryStore, Behaviour};

let store: MemoryStore<()> = MemoryStore::new(Default::default());
let behaviour = Behaviour::new(store);

Structs§

Config
Config for MemoryStore.
MemoryStore
A in-memory store that uses LRU cache for bounded storage of addresses and a frequency-based ordering of addresses.
PeerRecord
Internal record of MemoryStore.

Enums§

Event
Event from the store and emitted to Swarm.