[−][src]Struct sendfile::SendFile
Wrapper around the sendfile
system call.
From the sendfile
manual ($ man sendfile 2
):
sendfile
copies data between one file descriptor and another. Because this copying is done within the kernel,sendfile
is more efficient than the combination of read and write, which would require transferring data to and from user space.
Platform support
Notes
The Future
implementation doesn't implement waking, it is up to the
caller to ensure future is polled again once the socket is ready to receive
more data.
Methods
impl<F, S> SendFile<F, S>
[src]
pub fn into_inner(self) -> (F, S)
[src]
Retrieve the file and socket.
pub fn written(&self) -> usize
[src]
Returns the number of bytes written.
Trait Implementations
impl<F: Debug, S: Debug> Debug for SendFile<F, S>
[src]
impl<F, S> Future for SendFile<F, S> where
F: AsRawFd + Unpin,
S: AsRawFd + Unpin,
[src]
F: AsRawFd + Unpin,
S: AsRawFd + Unpin,
Auto Trait Implementations
impl<F, S> Sync for SendFile<F, S> where
F: Sync,
S: Sync,
F: Sync,
S: Sync,
impl<F, S> Send for SendFile<F, S> where
F: Send,
S: Send,
F: Send,
S: Send,
impl<F, S> Unpin for SendFile<F, S> where
F: Unpin,
S: Unpin,
F: Unpin,
S: Unpin,
impl<F, S> RefUnwindSafe for SendFile<F, S> where
F: RefUnwindSafe,
S: RefUnwindSafe,
F: RefUnwindSafe,
S: RefUnwindSafe,
impl<F, S> UnwindSafe for SendFile<F, S> where
F: UnwindSafe,
S: UnwindSafe,
F: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,