Ability to (de)serialize NetworkConfigBuilder (#897)

This commit is contained in:
Aurélien
2023-01-18 11:17:43 +01:00
committed by GitHub
parent e9792c1b46
commit 115e623ae6
16 changed files with 69 additions and 57 deletions

View File

@ -23,6 +23,7 @@ tracing = "0.1"
pin-project-lite = "0.2.9"
tokio = { version = "1", features = ["time"] }
thiserror = "1.0"
serde_with = "2.1.0"
[dev-dependencies]
reth-tracing = { path = "../../tracing" }

View File

@ -9,6 +9,7 @@
use igd::aio::search_gateway;
use pin_project_lite::pin_project;
use serde_with::{DeserializeFromStr, SerializeDisplay};
use std::{
fmt,
future::{poll_fn, Future},
@ -21,7 +22,9 @@ use std::{
use tracing::warn;
/// All builtin resolvers.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Default, Hash)]
#[derive(
Debug, Clone, Copy, Eq, PartialEq, Default, Hash, SerializeDisplay, DeserializeFromStr,
)]
pub enum NatResolver {
/// Resolve with any available resolver.
#[default]