Struct poem::web::StaticFileRequest
source[−]pub struct StaticFileRequest { /* private fields */ }
Expand description
An extractor for responding static files.
Implementations
pub fn create_response(
self,
path: impl AsRef<Path>,
prefer_utf8: bool
) -> Result<StaticFileResponse, StaticFileError>
pub fn create_response(
self,
path: impl AsRef<Path>,
prefer_utf8: bool
) -> Result<StaticFileResponse, StaticFileError>
Create static file response.
prefer_utf8
- Specifies whether text responses should signal a UTF-8
encoding.
Trait Implementations
fn from_request<'life0, 'async_trait>(
req: &'a Request,
_body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn from_request<'life0, 'async_trait>(
req: &'a Request,
_body: &'life0 mut RequestBody
) -> Pin<Box<dyn Future<Output = Result<Self>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Extract from request head and body.
Auto Trait Implementations
impl RefUnwindSafe for StaticFileRequest
impl Send for StaticFileRequest
impl Sync for StaticFileRequest
impl Unpin for StaticFileRequest
impl UnwindSafe for StaticFileRequest
Blanket Implementations
Mutably borrows from an owned value. Read more
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