Expand description
This file contains the PersistentStore
struct, which is a wrapper around a RecordStore
that occasionally saves the DHT to a persistent storage.
Structs§
- DhtFile
Persistence - A
PersistentStorage
that persists the DHT to a file on disk. Used mostly for testing. - DhtNo
Persistence - A no-op
PersistentStorage
that does not persist the DHT - Persistent
Store - A
RecordStore
wrapper that occasionally saves the DHT to a persistent storage. - Serializable
Record - A serializable version of a Libp2p
Record
Traits§
- DhtPersistent
Storage - A trait that we use to save and load the DHT to a file on disk or other storage medium
Functions§
- instant_
to_ 🔒unix_ seconds - Approximate an
Instant
to the number of seconds since the Unix epoch - unix_
seconds_ 🔒to_ instant - Convert a unix-second timestamp to an
Instant