Skip to main content

Part

Struct Part 

Source
pub struct Part { /* private fields */ }
Expand description

One range of a Split, read a chunk at a time like a whole Reader.

Implementations§

Source§

impl Part

Source

pub fn next_chunk(&mut self) -> Result<Option<Chunk>>

The next chunk of this range, or None once it has handed back every record that starts in it.

The first call waits until the range’s true start is known, which usually means until the range before it has guessed.

§Errors

The error a single Reader over the whole file would have reported first, whichever range it is in, once any range meets one.

Source

pub fn bytes_read(&self) -> u64

How many bytes of the file this range’s reader has read.

The guess and a second split after a wrong one read the range too, and are not counted, so that the ranges of a file add up to about the file.

Trait Implementations§

Source§

impl Debug for Part

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !RefUnwindSafe for Part

§

impl !UnwindSafe for Part

§

impl Freeze for Part

§

impl Send for Part

§

impl Sync for Part

§

impl Unpin for Part

§

impl UnsafeUnpin for Part

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.