Module fsm

Source
Expand description

Async io, written in fsm style

IO ops are written as async state machines that thread the state through the futures to avoid being encumbered by lifetimes.

This makes them occasionally a bit verbose to use, but allows being generic without having to box the futures.

The traits to perform async io are re-exported from iroh-io.

Re-exports§

pub use super::BaoContentItem;

Structs§

ResponseDecoder
Response decoder

Enums§

ResponseDecoderNext
Next type for ResponseDecoder.

Traits§

AsyncSliceReader
A trait to abstract async reading from different resource.
AsyncSliceWriter
A trait to abstract async writing to different resources.
CreateOutboard
Convenience trait to initialize an outboard from a data source.
Outboard
A binary merkle tree for blake3 hashes of a blob.
OutboardMut
A mutable outboard.

Functions§

copy
Copy an outboard to another outboard.
decode_ranges
Decode a response into a file while updating an outboard.
encode_ranges
Encode ranges relevant to a query from a reader and outboard to a writer
encode_ranges_validated
Encode ranges relevant to a query from a reader and outboard to a writer
outboard
Compute the outboard for the given data.
outboard_post_order
Compute the post order outboard for the given data, writing into a io::Write
valid_outboard_ranges
Given just an outboard, compute all valid ranges.
valid_ranges
Given a data file and an outboard, compute all valid ranges.