Function rust_ipfs::refs::iplds_refs
source · pub fn iplds_refs<'a, MaybeOwned, Iter>(
repo: MaybeOwned,
iplds: Iter,
max_depth: Option<u64>,
unique: bool
) -> impl Stream<Item = Result<Edge, Error>> + Send + 'aExpand description
Gather links as edges between two documents from all of the iplds which represent the
document and it’s original Cid, as the Ipld can be a subtree of the document.
This stream does not stop on error.
Differences from other implementations
js-ipfs does seem to do a recursive descent on all links. Looking at the tests it would
appear that go-ipfs implements this in similar fashion. This implementation is breadth-first
to be simpler at least.
Related: https://github.com/ipfs/js-ipfs/pull/2982
Lifetime of returned stream
Depending on how this function is called, the lifetime will be tied to the lifetime of given
&Ipfs or 'static when given ownership of Ipfs.