[][src]Struct ipfs_unixfs::file::visit::IdleFileVisit

pub struct IdleFileVisit { /* fields omitted */ }

IdleFileVisit represents a prepared file visit over a tree. The user has to know the CID and be able to get the block for the visit.

Note: For easier to use interface, you should consider using ipfs_unixfs::walk::Walker. It uses IdleFileVisit and FileVisit internally but has a better API.

Implementations

impl IdleFileVisit[src]

pub fn with_target_range(self, range: Range<u64>) -> Self[src]

Target range represents the target byte range of the file we are interested in visiting.

pub fn start(
    self,
    block: &[u8]
) -> Result<(&[u8], u64, Metadata, Option<FileVisit>), FileReadFailed>
[src]

Begins the visitation by processing the first block to be visited.

Returns (on success) a tuple of file bytes, total file size, any metadata associated, and optionally a FileVisit to continue the walk.

Trait Implementations

impl Debug for IdleFileVisit[src]

impl Default for IdleFileVisit[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.