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§
Source§impl<'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§
Source§impl AsRef<[u8]> for FileSegment<'_>
impl AsRef<[u8]> for FileSegment<'_>
Auto Trait Implementations§
impl<'a> Freeze for FileSegment<'a>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more