pub struct StdFilePusher { /* private fields */ }Expand description
File pusher using a raw std::fs::File with random-access writes and no
userspace write buffer.
Every push seeks to range.start and writes directly to the
OS. It is intended to be wrapped by a buffering decorator such as
crate::BufWriterPusher when syscall batching is desired, or used directly
when writes are already large/sequential.
The sync_all flag controls whether fsync is called on
flush. A bare std::fs::File has no userspace buffer, so
flush itself performs no copying — it only issues fsync when requested.
Implementations§
Trait Implementations§
Source§impl Debug for StdFilePusher
impl Debug for StdFilePusher
Source§impl Pusher for StdFilePusher
impl Pusher for StdFilePusher
Source§fn set_listener(&mut self, cb: ProgressListener)
fn set_listener(&mut self, cb: ProgressListener)
Install a callback that fires whenever a chunk has been successfully
pushed to its destination. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StdFilePusher
impl !Sync for StdFilePusher
impl !UnwindSafe for StdFilePusher
impl Freeze for StdFilePusher
impl Send for StdFilePusher
impl Unpin for StdFilePusher
impl UnsafeUnpin for StdFilePusher
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