Struct rocket_file_cache::named_in_memory_file::NamedInMemoryFile
[−]
[src]
pub struct NamedInMemoryFile<'a> { /* fields omitted */ }
A wrapper around an in-memory file. This struct is created when when a request to the cache is made. The CachedFile knows its path, so it can set the content type when it is serialized to a response.
Trait Implementations
impl<'a> Debug for NamedInMemoryFile<'a>
[src]
impl<'a> Responder<'a> for NamedInMemoryFile<'a>
[src]
Streams the cached file to the client. Sets or overrides the Content-Type in the response according to the file's extension if the extension is recognized.
If you would like to stream a file with a different Content-Type than that implied by its
extension, convert the CachedFile
to a File
, and respond with that instead.
Based on NamedFile from rocket::response::NamedFile