[−][src]Function ipfs::unixfs::cat
pub async fn cat<'a, Types, MaybeOwned>(
ipfs: MaybeOwned,
starting_point: impl Into<StartingPoint>,
range: Option<Range<u64>>
) -> Result<impl Stream<Item = Result<Vec<u8>, TraversalFailed>> + Send + 'a, TraversalFailed> where
Types: IpfsTypes,
MaybeOwned: Borrow<Ipfs<Types>> + Send + 'a,
IPFS cat operation, producing a stream of file bytes. This is generic over the different kinds
of ways to own an Ipfs
value in order to support both operating with borrowed Ipfs
value
and an owned value. Passing an owned value allows the return value to be 'static
, which can
be helpful in some contexts, like the http.
Returns a stream of bytes on the file pointed with the Cid.