pub struct PvBuilder { /* private fields */ }Expand description
Builder for Pv (FR-043, FR-055). All methods are independent and
order-agnostic; each setter is idempotent (last-write-wins). build() is
INFALLIBLE.
Implementations§
Source§impl PvBuilder
impl PvBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Fresh builder with all defaults applied:
total_bytes:Nonerate_limit:Nonebuffer_size: 1 MiBinterval: 1 secondname:Nonereporter:NoopReporter
Sourcepub fn total_bytes(self, n: u64) -> Self
pub fn total_bytes(self, n: u64) -> Self
Expected total bytes (-s SIZE).
Sourcepub fn rate_limit(self, bytes_per_sec: u64) -> Self
pub fn rate_limit(self, bytes_per_sec: u64) -> Self
Rate limit in bytes/sec (-L RATE).
Sourcepub fn buffer_size(self, n: usize) -> Self
pub fn buffer_size(self, n: usize) -> Self
Internal copy-loop buffer size (-B BYTES).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PvBuilder
impl !RefUnwindSafe for PvBuilder
impl Send for PvBuilder
impl !Sync for PvBuilder
impl Unpin for PvBuilder
impl UnsafeUnpin for PvBuilder
impl !UnwindSafe for PvBuilder
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