pub struct SendFile {
pub file: RawFd,
pub count: usize,
pub offset: off_t,
}Expand description
Abstraction for interacting with Linux’s zero-copy I/O sendfile syscall.
let mut sendfile = SendFile::new(source, count)?;
loop {
match sendfile.send(dest)? {
0 => return Ok(()),
_ => ()
}
}Fields§
§file: RawFd§count: usize§offset: off_tImplementations§
Auto Trait Implementations§
impl Freeze for SendFile
impl RefUnwindSafe for SendFile
impl Send for SendFile
impl Sync for SendFile
impl Unpin for SendFile
impl UnwindSafe for SendFile
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