[][src]Struct ipfs_unixfs::file::reader::Traversal

pub struct Traversal { /* fields omitted */ }

Carrier of validation data used between blocks during a walk on the merkle tree.

Implementations

impl Traversal[src]

pub fn continue_walk<'a>(
    self,
    next_block: &'a [u8],
    tree_range: &Range<u64>
) -> Result<FileReader<'a>, FileReadFailed>
[src]

Continues the walk on the merkle tree with the given block contents. The block contents is not validated and the range is expected to be the next from previous call to FileContent::Links iterator.

When calling this directly, it is good to note that repeatedly calling this with the same block contents will not be detected, and will instead grow the internal Vec of links until memory runs out.

pub fn file_size(&self) -> u64[src]

Returns the total size of the file.

Trait Implementations

impl AsRef<Metadata> for Traversal[src]

impl Debug for Traversal[src]

Auto Trait Implementations

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.