Struct rocket_download_response::DownloadResponsePro [−][src]
pub struct DownloadResponsePro<'o> { /* fields omitted */ }
Implementations
Create a DownloadResponse
instance from a &'o [u8]
.
Create a DownloadResponse
instance from a Vec<u8>
.
Create a DownloadResponse
instance from a reader.
Create a DownloadResponse
instance from a path of a file.
pub fn from_temp_file<S: Into<String>>(
temp_file: TempFile<'o>,
file_name: Option<S>,
content_type: Option<Mime>
) -> DownloadResponsePro<'o>
pub fn from_temp_file<S: Into<String>>(
temp_file: TempFile<'o>,
file_name: Option<S>,
content_type: Option<Mime>
) -> DownloadResponsePro<'o>
Create a DownloadResponse
instance from a TempFile
.
Trait Implementations
Returns Ok
if a Response
could be generated successfully. Otherwise,
returns an Err
with a failing Status
. Read more
Auto Trait Implementations
impl<'o> !RefUnwindSafe for DownloadResponsePro<'o>
impl<'o> Send for DownloadResponsePro<'o>
impl<'o> !Sync for DownloadResponsePro<'o>
impl<'o> Unpin for DownloadResponsePro<'o>
impl<'o> !UnwindSafe for DownloadResponsePro<'o>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.