#[non_exhaustive]pub struct Pv { /* private fields */ }Expand description
Configured pipe-viewer runner. Construct via PvBuilder.
Implementations§
Source§impl Pv
impl Pv
Sourcepub fn copy<R: Read + ?Sized, W: Write + ?Sized>(
self,
reader: &mut R,
writer: &mut W,
) -> Result<u64, PvError>
pub fn copy<R: Read + ?Sized, W: Write + ?Sized>( self, reader: &mut R, writer: &mut W, ) -> Result<u64, PvError>
Stream reader → writer while reporting progress to the configured
reporter. Returns the number of bytes transferred or an error (FR-046).
§Errors
Returns PvError::Io on any I/O failure during read or write.
Sourcepub fn total_bytes(&self) -> Option<u64>
pub fn total_bytes(&self) -> Option<u64>
Configured total-byte hint (-s SIZE).
Sourcepub fn rate_limit(&self) -> Option<u64>
pub fn rate_limit(&self) -> Option<u64>
Configured rate limit in bytes/sec (-L RATE).
Sourcepub fn buffer_size(&self) -> usize
pub fn buffer_size(&self) -> usize
Configured internal buffer size (-B BYTES).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pv
impl !RefUnwindSafe for Pv
impl Send for Pv
impl !Sync for Pv
impl Unpin for Pv
impl UnsafeUnpin for Pv
impl !UnwindSafe for Pv
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