Struct diem_data_client::diemnet::DiemNetDataClient[][src]

pub struct DiemNetDataClient { /* fields omitted */ }
Expand description

A DiemDataClient that fulfills requests from remote peers’ Storage Service over DiemNet.

The DiemNetDataClient:

  1. Sends requests to connected DiemNet peers.
  2. Does basic type conversions and error handling on the responses.
  3. Routes requests to peers that advertise availability for that data.
  4. Maintains peer scores based on each peer’s observed quality of service and upper client reports of invalid or malicious data.
  5. Selects high quality peers to send each request to.
  6. Exposes a condensed data summary of our peers’ data advertisements.

The client currently assumes 1-request => 1-response. Streaming responses are handled at an upper layer.

The client is expected to be cloneable and usable from many concurrent tasks and/or threads.

Implementations

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 a global summary of the data currently available in the network. Read more

Returns a single account states chunk with proof, containing the accounts from start to end index (inclusive) at the specified version. The proof version is the same as the specified version. Read more

Returns all epoch ending ledger infos between start and end (inclusive). If the data cannot be fetched (e.g., the number of epochs is too large), an error is returned. Read more

Returns the number of account states at the specified version.

Returns a transaction output list with proof object, with transaction outputs from start to end versions (inclusive). The proof is relative to the specified proof_version. If the data cannot be fetched (e.g., the number of transaction outputs is too large), an error is returned. Read more

Returns a transaction list with proof object, with transactions from start to end versions (inclusive). The proof is relative to the specified proof_version. If include_events is true, events are included in the proof. If the data cannot be fetched (e.g., the number of transactions is too large), an error is returned. 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)

recently added

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.