Struct poem::endpoint::StaticFile [−][src]
pub struct StaticFile { /* fields omitted */ }
This is supported on crate feature
static-files
only.Expand description
Implementations
Create new single static file service for a specified file path.
Example
use poem::{endpoint::StaticFile, Route};
let app = Route::new().at("/logo.png", StaticFile::new("/etc/logo.png"));
Specifies whether text responses should signal a UTF-8 encoding.
Default is true
.
Trait Implementations
Get the response to the request.
Auto Trait Implementations
impl RefUnwindSafe for StaticFile
impl Send for StaticFile
impl Sync for StaticFile
impl Unpin for StaticFile
impl UnwindSafe for StaticFile
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