[−][src]Struct ipfs_unixfs::walk::Walker
Walker
helps with walking a UnixFS tree, including all of the content and files. It is
created with Walker::new
and walked over each block with Walker::continue_block
. Use
Walker::pending_links
to obtain the next Cid
to be loaded and the prefetchable links.
Implementations
impl Walker
[src]
pub fn new(cid: Cid, root_name: String) -> Walker
[src]
Returns a new instance of a walker, ready to start from the given Cid
.
pub fn pending_links<'a>(
&'a self
) -> (&'a Cid, impl Iterator<Item = &'a Cid> + 'a)
[src]
&'a self
) -> (&'a Cid, impl Iterator<Item = &'a Cid> + 'a)
Returns the next Cid
to load and pass its associated content to continue_walk
.
pub fn next<'a: 'c, 'b: 'c, 'c>(
&'a mut self,
bytes: &'b [u8],
cache: &mut Option<Cache>
) -> Result<ContinuedWalk<'c>, Error>
[src]
&'a mut self,
bytes: &'b [u8],
cache: &mut Option<Cache>
) -> Result<ContinuedWalk<'c>, Error>
Continues the walk.
Returns a descriptor for the next element found as ContinuedWalk
which includes the means
to further continue the walk. bytes
is the raw data of the next block, cache
is an
optional cache for data structures which can always be substituted with &mut None
.
pub fn should_continue(&self) -> bool
[src]
true
if the walk of inspect
should continue
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Walker
impl Send for Walker
impl Sync for Walker
impl Unpin for Walker
impl UnwindSafe for Walker
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,