Enum poem::web::StaticFileResponse
source[−]pub enum StaticFileResponse {
Ok {
body: Body,
content_type: Option<String>,
etag: Option<String>,
last_modified: Option<String>,
content_range: Option<(Range<u64>, u64)>,
},
NotModified,
}
Expand description
A response for static file extractor.
Variants
Ok
Fields
body: Body
Response body
200 OK
NotModified
304 NOT MODIFIED
Trait Implementations
Consume itself and return Response
.
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self> where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
Self: Sized,
fn with_header<K, V>(self, key: K, value: V) -> WithHeader<Self> where
K: TryInto<HeaderName>,
V: TryInto<HeaderValue>,
Self: Sized,
Wrap an impl IntoResponse
to add a header. Read more
Wrap an impl IntoResponse
to set a status code. Read more
Auto Trait Implementations
impl !RefUnwindSafe for StaticFileResponse
impl Send for StaticFileResponse
impl Sync for StaticFileResponse
impl Unpin for StaticFileResponse
impl !UnwindSafe for StaticFileResponse
Blanket Implementations
Mutably borrows from an owned value. Read more
Consumes this value returns a poem::Result<T>
.
pub fn vzip(self) -> V
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