Struct tk_sendfile::Sendfile
[−]
[src]
pub struct Sendfile<O: FileOpener + Send + 'static> { /* fields omitted */ }
A structure that tracks progress of sending a file
Methods
impl<O: FileOpener> Sendfile<O>[src]
fn size(&self) -> u64
Returns full size of the file
Note that if file changes while we are reading it, we may not be
able to send this number of bytes. In this case we will return
WriteZero error however.
fn write_into<D: Destination>(self, dest: D) -> WriteFile<O, D>
Returns a future which resolves to original socket when file has been written into a file