pub struct FileOptions { /* private fields */ }Expand description
Per-response settings
Implementations§
Source§impl FileOptions
impl FileOptions
pub fn new() -> Self
Sourcepub fn cache_control(self, value: impl Into<String>) -> Self
pub fn cache_control(self, value: impl Into<String>) -> Self
Cache-Control header value
Sourcepub fn content_type(self, value: impl Into<String>) -> Self
pub fn content_type(self, value: impl Into<String>) -> Self
Override the type guessed from the extension
Sourcepub fn attachment(self, filename: impl Into<String>) -> Self
pub fn attachment(self, filename: impl Into<String>) -> Self
Offer the file as a download under this name (Content-Disposition: attachment)
Trait Implementations§
Source§impl Clone for FileOptions
impl Clone for FileOptions
Source§impl Debug for FileOptions
impl Debug for FileOptions
Auto Trait Implementations§
impl Freeze for FileOptions
impl RefUnwindSafe for FileOptions
impl Send for FileOptions
impl Sync for FileOptions
impl Unpin for FileOptions
impl UnsafeUnpin for FileOptions
impl UnwindSafe for FileOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more