Struct hyper_staticfile::FileResponseBuilder [−][src]
pub struct FileResponseBuilder {
pub cache_headers: Option<u32>,
pub is_head: bool,
pub if_modified_since: Option<SystemTime>,
}
Expand description
Utility to build responses for serving a tokio::fs::File
.
This struct allows direct access to its fields, but these fields are typically initialized by the accessors, using the builder pattern. The fields are basically a bunch of settings that determine the response details.
Fields
cache_headers: Option<u32>
Whether to send cache headers, and what lifespan to indicate.
is_head: bool
Whether this is a HEAD
request, with no response body.
if_modified_since: Option<SystemTime>
The parsed value of the If-Modified-Since
request header.
Implementations
Apply parameters based on a request.
Apply parameters based on request parts.
Apply parameters based on a request method.
Apply parameters based on request headers.
Add cache headers to responses for the given lifespan.
Set whether this is a HEAD
request, with no response body.
Build responses for the given If-Modified-Since
date-time.
Build responses for the given If-Modified-Since
request header value.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for FileResponseBuilder
impl Send for FileResponseBuilder
impl Sync for FileResponseBuilder
impl Unpin for FileResponseBuilder
impl UnwindSafe for FileResponseBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more