Struct salvo_core::fs::NamedFileBuilder
source · pub struct NamedFileBuilder { /* private fields */ }
Expand description
Builder for build NamedFile
.
Implementations§
source§impl NamedFileBuilder
impl NamedFileBuilder
sourcepub fn attached_name<T: Into<String>>(self, attached_name: T) -> Self
pub fn attached_name<T: Into<String>>(self, attached_name: T) -> Self
Sets attached filename and returns Self
.
sourcepub fn disposition_type<T: Into<String>>(self, disposition_type: T) -> Self
pub fn disposition_type<T: Into<String>>(self, disposition_type: T) -> Self
Sets disposition encoding and returns Self
.
sourcepub fn disable_content_disposition(&mut self)
pub fn disable_content_disposition(&mut self)
Disable Content-Disposition
header.
By default Content-Disposition` header is enabled.
sourcepub fn content_type(self, content_type: Mime) -> Self
pub fn content_type(self, content_type: Mime) -> Self
Sets content type and returns Self
.
sourcepub fn content_encoding<T: Into<String>>(self, content_encoding: T) -> Self
pub fn content_encoding<T: Into<String>>(self, content_encoding: T) -> Self
Sets content encoding and returns Self
.
sourcepub fn buffer_size(self, buffer_size: u64) -> Self
pub fn buffer_size(self, buffer_size: u64) -> Self
Sets buffer size and returns Self
.
sourcepub fn use_etag(self, value: bool) -> Self
pub fn use_etag(self, value: bool) -> Self
Specifies whether to use ETag or not.
Default is true.
sourcepub fn use_last_modified(self, value: bool) -> Self
pub fn use_last_modified(self, value: bool) -> Self
Specifies whether to use Last-Modified or not.
Default is true.
Trait Implementations§
source§impl Clone for NamedFileBuilder
impl Clone for NamedFileBuilder
source§fn clone(&self) -> NamedFileBuilder
fn clone(&self) -> NamedFileBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for NamedFileBuilder
impl RefUnwindSafe for NamedFileBuilder
impl Send for NamedFileBuilder
impl Sync for NamedFileBuilder
impl Unpin for NamedFileBuilder
impl UnwindSafe for NamedFileBuilder
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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