[][src]Struct ipfs_unixfs::walk::Walker

pub struct Walker { /* fields omitted */ }

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 as_entry(&self) -> Option<Entry>[src]

Returns a description of the kind of node the Walker is currently looking at, if continue_walk has been called after the value was created.

Returns the next Cid to load and pass its associated content to continue_walk.

pub fn continue_walk<'a>(
    self,
    bytes: &'a [u8],
    cache: &mut Option<Cache>
) -> Result<ContinuedWalk<'a>, Error>
[src]

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.

Trait Implementations

impl Debug for Walker[src]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.