Struct hyper_fs::StaticFile
[−]
[src]
pub struct StaticFile<C> { /* fields omitted */ }
Static File
Methods
impl<C> StaticFile<C> where
C: AsRef<Config> + Send + 'static,
[src]
C: AsRef<Config> + Send + 'static,
fn new<P: Into<PathBuf>>(
handle: Handle,
pool: CpuPool,
file: P,
config: C
) -> Self
[src]
handle: Handle,
pool: CpuPool,
file: P,
config: C
) -> Self
fn headers_maker<M>(&mut self, maker: M) where
M: FnMut(&mut File, &Metadata, &PathBuf, &Request, &mut Headers) -> Result<()> + Send + 'static,
[src]
M: FnMut(&mut File, &Metadata, &PathBuf, &Request, &mut Headers) -> Result<()> + Send + 'static,
You should seek to 0 if you modify the File(Read or seek), You could not write or append it.
The FnMut
will being calling before 200 when Get method(If Range or 304 status, it will not be calling).
You could set Content-Type
, Charset
, etc ...
fn headers_mut(&mut self) -> &mut Option<Headers>
[src]
You can set the init Haeders
Warning: not being covered by inner code.