pub fn walk(&mut self, current: &Cid, mut ipld: Ipld) -> Result<WalkSuccess, WalkFailed> {
        if self.len() == 0 {
            return Ok(WalkSuccess::EmptyPath(ipld));
        }
        if current.codec() == cid::Codec::DagProtobuf {
            return Err(WalkFailed::UnsupportedWalkOnDagPbIpld);
        }

        loop {
            ipld = match self.resolve(ipld)? {
                WalkSuccess::AtDestination(ipld) => ipld,
                WalkSuccess::EmptyPath(ipld) => return Ok(WalkSuccess::AtDestination(ipld)),
                ret @ WalkSuccess::Link(_, _) => return Ok(ret),
            };
        }
    }
/// Walks the path depicted by self until either the path runs out or a new link needs to be
/// traversed to continue the walk. With !dag-pb documents this can result in subtree of an
/// Ipld be represented.
///
/// # Panics
///
/// If the current Ipld is from a dag-pb and the libipld has changed it's dag-pb tree structure.
// FIXME: this needs to be removed and ... we should have some generic Ipld::walk
Walks the path depicted by self until either the path runs out or a new link needs to be
traversed to continue the walk. With !dag-pb documents this can result in subtree of an
Ipld be represented.
Walks the path depicted by self until either the path runs out or a new link needs to be traversed to continue the walk . With !dag - pb documents this can result in subtree of an Ipld be represented .
pub fn walk(&mut self, current: &Cid, mut ipld: Ipld) -> Result<WalkSuccess, WalkFailed> {
        if self.len() == 0 {
            return Ok(WalkSuccess::EmptyPath(ipld));
        }
        if current.codec() == cid::Codec::DagProtobuf {
            return Err(WalkFailed::UnsupportedWalkOnDagPbIpld);
        }
        loop {
            ipld = match self.resolve(ipld)? {
                WalkSuccess::AtDestination(ipld) => ipld,
                WalkSuccess::EmptyPath(ipld) => return Ok(WalkSuccess::AtDestination(ipld)),
                ret @ WalkSuccess::Link(_, _) => return Ok(ret),
            };
        }
    }
pub fn walk ( & mut self , current : & Cid , mut ipld : Ipld ) -> Result < WalkSuccess , WalkFailed > { if self . len ( ) == 0 { return Ok ( WalkSuccess :: EmptyPath ( ipld ) ) ; } if current . codec ( ) == cid :: Codec :: DagProtobuf { return Err ( WalkFailed :: UnsupportedWalkOnDagPbIpld ) ; } loop { ipld = match self . resolve ( ipld ) ? { WalkSuccess :: AtDestination ( ipld ) => ipld , WalkSuccess :: EmptyPath ( ipld ) => return Ok ( WalkSuccess :: AtDestination ( ipld ) ) , ret @ WalkSuccess :: Link ( _ , _ ) => return Ok ( ret ) , } ; } }
Walks the path depicted by self until either the path runs out or a new link needs to be
traversed to continue the walk.
Walks the path depicted by self until either the path runs out or a new link needs to be traversed to continue the walk .
&mut self
current
&Cid
ipld
Ipld
&mut self
current
&Cid
ipld
Ipld
panics
If the current Ipld is from a dag-pb and the libipld has changed it's dag-pb tree structure.
FIXME: this needs to be removed and ... we should have some generic Ipld::walk
If the current Ipld is from a dag - pb and the libipld has changed it ' s dag - pb tree structure . FIXME : this needs to be removed and ... we should have some generic Ipld :: walk