Struct safe_network::client::Config [−][src]
pub struct Config {
pub local_addr: SocketAddr,
pub root_dir: PathBuf,
pub genesis_key: PublicKey,
pub qp2p: QuicP2pConfig,
pub query_timeout: Duration,
}Expand description
Configuration for sn_client.
Fields
local_addr: SocketAddrThe local address to bind to.
root_dir: PathBufPath to local storage.
genesis_key: PublicKeyNetwork’s genesis key
qp2p: QuicP2pConfigQuicP2p options.
query_timeout: DurationThe amount of time to wait for responses to queries before giving up and returning an error.
Implementations
Returns a new Config instance.
This will try to read QuicP2P configuration from config_file_path, or else use the default
QuicP2P config. In either case, bootstrap_nodes will be used to override the initial
network contacts.
If local_addr is not specified, 127.0.0.1:0 will be used (e.g. localhost with a random
port).
If query_timeout is not specified, DEFAULT_QUERY_TIMEOUT will be used.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Config
impl UnwindSafe for Config
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more