Struct http_file_headers::FileWrapper
[−]
[src]
pub struct FileWrapper { /* fields omitted */ }
Structure that contains all the metadata for response headers and the file which will be sent in response body.
Methods
impl FileWrapper
[src]
fn is_partial(&self) -> bool
Returns true if response contains partial content (206)
fn content_length(&self) -> u64
Returns the value of Content-Length
header that should be sent
fn headers(&self) -> HeaderIter
Returns the iterator over headers to send in response
Note: this does not include Content-Length
header,
use content_length()
method explicitly.
fn read_chunk<O>(&mut self, output: O) -> Result<usize> where
O: Write,
O: Write,
Read chunk from file into an output file
Must be run in disk thread