logo
pub struct ClientConfig {
    pub local_addr: SocketAddr,
    pub root_dir: PathBuf,
    pub genesis_key: PublicKey,
    pub qp2p: QuicP2pConfig,
    pub query_timeout: Duration,
    pub standard_wait: Duration,
}
Expand description

Configuration for sn_client.

Fields

local_addr: SocketAddr

The local address to bind to.

root_dir: PathBuf

Path to local storage.

genesis_key: PublicKey

Network’s genesis key

qp2p: QuicP2pConfig

QuicP2p options.

query_timeout: Duration

The amount of time to wait for responses to queries before giving up and returning an error.

standard_wait: Duration

The amount of time to wait after a command is sent for AE flows to complete.

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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