Struct unixfs_v1::walk::FileSegment[][src]

pub struct FileSegment<'a> { /* fields omitted */ }
Expand description

A slice of bytes of a possibly multi-block file. The slice can be accessed via as_bytes() or AsRef<[u8]>::as_ref().

Implementations

Returns true if this is the first block in the file, false otherwise.

Note: the first block can also be the last one.

Returns true if this is the last block in the file, false otherwise.

Note: the last block can also be the first one.

Returns a slice into the file’s bytes, which can be empty, as is the case for any intermediate blocks which only contain links to further blocks.

Trait Implementations

Performs the conversion.

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Scrape the references from an impl Read. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.