Skip to main content

FetchItem

Type Alias FetchItem 

Source
pub type FetchItem = Result<(Cid, Bytes), BitswapError>;
Expand description

A fetched block or request error. Block bytes are Bytes because a block may be delivered to multiple concurrent requests without copying.

Aliased Type§

pub enum FetchItem {
    Ok((Cid<64>, Bytes)),
    Err(BitswapError),
}

Variants§

§1.0.0

Ok((Cid<64>, Bytes))

Contains the success value

§1.0.0

Err(BitswapError)

Contains the error value