pub struct StreamableFileOptions { /* private fields */ }Expand description
Options for Nest-style streamable file responses.
Implementations§
Source§impl StreamableFileOptions
impl StreamableFileOptions
pub fn new() -> Self
pub fn with_content_type(self, content_type: impl Into<String>) -> Self
pub fn with_content_disposition( self, content_disposition: impl Into<String>, ) -> Self
pub fn with_attachment(self, file_name: impl AsRef<str>) -> Result<Self>
pub fn with_inline(self, file_name: impl AsRef<str>) -> Result<Self>
pub fn with_content_length(self, content_length: u64) -> Self
pub fn content_type(&self) -> Option<&str>
pub fn content_disposition(&self) -> Option<&str>
pub fn content_length(&self) -> Option<u64>
Trait Implementations§
Source§impl Clone for StreamableFileOptions
impl Clone for StreamableFileOptions
Source§fn clone(&self) -> StreamableFileOptions
fn clone(&self) -> StreamableFileOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StreamableFileOptions
impl Debug for StreamableFileOptions
Source§impl Default for StreamableFileOptions
impl Default for StreamableFileOptions
Source§fn default() -> StreamableFileOptions
fn default() -> StreamableFileOptions
Returns the “default value” for a type. Read more
impl Eq for StreamableFileOptions
Source§impl PartialEq for StreamableFileOptions
impl PartialEq for StreamableFileOptions
impl StructuralPartialEq for StreamableFileOptions
Auto Trait Implementations§
impl Freeze for StreamableFileOptions
impl RefUnwindSafe for StreamableFileOptions
impl Send for StreamableFileOptions
impl Sync for StreamableFileOptions
impl Unpin for StreamableFileOptions
impl UnsafeUnpin for StreamableFileOptions
impl UnwindSafe for StreamableFileOptions
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