pub struct ClientBuilder {
    pub node_manager_builder: NodeManagerBuilder,
    pub network_info: NetworkInfo,
    pub api_timeout: Duration,
    pub remote_pow_timeout: Duration,
    pub pow_worker_count: Option<usize>,
}
Expand description

Builder to construct client instance with sensible default values

Fields

node_manager_builder: NodeManagerBuilder

Node manager builder

network_info: NetworkInfo

Data related to the used network

api_timeout: Duration

Timeout for API requests

remote_pow_timeout: Duration

Timeout when sending a block that requires remote proof of work

pow_worker_count: Option<usize>

The amount of threads to be used for proof of work

Implementations

Creates an IOTA client builder.

Set the fields from a client JSON config

Export the client builder as JSON string

Adds an IOTA node by its URL.

Adds an IOTA node by its URL to be used as primary node, with optional jwt and or basic authentication

Adds an IOTA node by its URL to be used as primary PoW node (for remote Pow), with optional jwt and or basic authentication

Adds a permanode by its URL, with optional jwt and or basic authentication

Adds an IOTA node by its URL with optional jwt and or basic authentication

Adds a list of IOTA nodes by their URLs.

Set the node sync interval

Ignores the node health status. Every node will be considered healthy and ready to use.

Set if quorum should be used or not

Set amount of nodes which should be used for quorum

Set quorum_threshold

Sets whether the PoW should be done locally or remotely.

Sets the amount of workers that should be used for PoW, default is num_cpus::get().

Sets whether the PoW should be done locally in case a node doesn’t support remote PoW.

Sets after how many seconds new tips will be requested during PoW

Sets the default request timeout.

Sets the request timeout for API usage.

Set User-Agent header for requests Default is “iota-client/{version}”

Build the Client instance.

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
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. 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
Checks if this value is equivalent to the given key. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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