pub struct DhtPersistenceConfig {
pub dump_interval: Option<Duration>,
pub config_filename: Option<PathBuf>,
}Expand description
Configuration for DHT persistence (periodic dump of routing table and peer store). When provided, the DHT state will be serialized to disk periodically.
Fields§
§dump_interval: Option<Duration>How often to dump state. Defaults to 60s.
config_filename: Option<PathBuf>Path to the JSON file. Uses OS-specific default if None.
Trait Implementations§
Source§impl Default for DhtPersistenceConfig
impl Default for DhtPersistenceConfig
Source§fn default() -> DhtPersistenceConfig
fn default() -> DhtPersistenceConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for DhtPersistenceConfig
impl RefUnwindSafe for DhtPersistenceConfig
impl Send for DhtPersistenceConfig
impl Sync for DhtPersistenceConfig
impl Unpin for DhtPersistenceConfig
impl UnsafeUnpin for DhtPersistenceConfig
impl UnwindSafe for DhtPersistenceConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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