pub struct FileSegment<'a> { /* private fields */ }
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()
.
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.
Converts this type into a shared reference of the (usually inferred) input type.
Formats the value using the given formatter.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
Scrape the references from an
impl Read
.
Read more
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.