Struct unixfs_v1::walk::FileSegment
source · [−]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()
.
Implementations
sourceimpl<'a> FileSegment<'a>
impl<'a> FileSegment<'a>
sourcepub fn is_first(&self) -> bool
pub fn is_first(&self) -> bool
Returns true
if this is the first block in the file, false
otherwise.
Note: the first block can also be the last one.
Trait Implementations
sourceimpl AsRef<[u8]> for FileSegment<'_>
impl AsRef<[u8]> for FileSegment<'_>
Auto Trait Implementations
impl<'a> RefUnwindSafe for FileSegment<'a>
impl<'a> Send for FileSegment<'a>
impl<'a> Sync for FileSegment<'a>
impl<'a> Unpin for FileSegment<'a>
impl<'a> UnwindSafe for FileSegment<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more