Module get

Source
Expand description

The low level client side API

Note that while using this API directly is fine, a simpler way to get data to a store is to use the crate::api::remote API, in particular the crate::api::remote::Remote::fetch function to download data to your local store.

To get data, create a connection using an iroh::Endpoint.

Create a crate::protocol::GetRequest describing the data you want to get.

Then create a state machine using fsm::start and drive it to completion by calling next on each state.

For some states you have to provide additional arguments when calling next, or you can choose to finish early.

Modules§

fsm
Finite state machine for get responses.
request
Utilities to generate or execute complex get requests without persisting to a store.

Structs§

Stats
Stats about the transfer.

Enums§

GetError
Failures for a get operation
GetResponseError
Error when processing a response

Type Aliases§

GetResult