Struct rocket_etagged_raw_response::EtaggedRawResponse [−][src]
pub struct EtaggedRawResponse<'o> { /* fields omitted */ }
Implementations
pub fn from_static<S: Into<String>>(
etag_if_none_match: &EtagIfNoneMatch<'_>,
data: &'o [u8],
file_name: Option<S>,
content_type: Option<Mime>
) -> EtaggedRawResponse<'o>
pub fn from_static<S: Into<String>>(
etag_if_none_match: &EtagIfNoneMatch<'_>,
data: &'o [u8],
file_name: Option<S>,
content_type: Option<Mime>
) -> EtaggedRawResponse<'o>
Create a EtaggedRawResponse
instance from a &'o [u8]
.
Create a EtaggedRawResponse
instance from a Vec<u8>
.
pub fn from_reader<R: AsyncRead + Send + Unpin + 'o, S: Into<String>>(
etag_if_none_match: &EtagIfNoneMatch<'_>,
etag: EntityTag<'static>,
reader: R,
file_name: Option<S>,
content_type: Option<Mime>,
content_length: Option<u64>
) -> EtaggedRawResponse<'o>
pub fn from_reader<R: AsyncRead + Send + Unpin + 'o, S: Into<String>>(
etag_if_none_match: &EtagIfNoneMatch<'_>,
etag: EntityTag<'static>,
reader: R,
file_name: Option<S>,
content_type: Option<Mime>,
content_length: Option<u64>
) -> EtaggedRawResponse<'o>
Create a EtaggedRawResponse
instance from a reader.
Create a EtaggedRawResponse
instance from a path of a file.
pub async fn from_temp_file<S: Into<String>>(
etag_if_none_match: &EtagIfNoneMatch<'r>,
temp_file: TempFile<'o>,
file_name: Option<S>,
content_type: Option<Mime>
) -> Result<EtaggedRawResponse<'o>, Error>
pub async fn from_temp_file<S: Into<String>>(
etag_if_none_match: &EtagIfNoneMatch<'r>,
temp_file: TempFile<'o>,
file_name: Option<S>,
content_type: Option<Mime>
) -> Result<EtaggedRawResponse<'o>, Error>
Create a EtaggedRawResponse
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 EtaggedRawResponse<'o>
impl<'o> Send for EtaggedRawResponse<'o>
impl<'o> !Sync for EtaggedRawResponse<'o>
impl<'o> Unpin for EtaggedRawResponse<'o>
impl<'o> !UnwindSafe for EtaggedRawResponse<'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.