pub struct WebEmbedableFile<T: EmbedableFile>(/* private fields */);
Expand description
A wrapper around the 2 types of embedable files that rust-embed-for-web
provides.
You shouldn’t manually create objects of this struct, you should rely on
.into_response()
or .into()
to create these from DynamicFile
s or
EmbeddedFile
s you get from your RustEmbed
.
Trait Implementations§
Source§impl<T: EmbedableFile> EmbedRespondable for WebEmbedableFile<T>where
T::Data: MessageBody,
impl<T: EmbedableFile> EmbedRespondable for WebEmbedableFile<T>where
T::Data: MessageBody,
type Data = <T as EmbedableFile>::Data
type DataGzip = <T as EmbedableFile>::Data
type DataBr = <T as EmbedableFile>::Data
type ETag = <T as EmbedableFile>::Meta
type LastModified = <T as EmbedableFile>::Meta
type MimeType = <T as EmbedableFile>::Meta
Source§fn data_gzip(&self) -> Option<Self::DataGzip>
fn data_gzip(&self) -> Option<Self::DataGzip>
The contents of the file compressed with gzip. Read more
Source§fn data_br(&self) -> Option<Self::DataGzip>
fn data_br(&self) -> Option<Self::DataGzip>
The contents of the file compressed with gzip. Read more
Source§fn last_modified(&self) -> Option<Self::LastModified>
fn last_modified(&self) -> Option<Self::LastModified>
The rfc2822 encoded last modified date.
Source§fn last_modified_timestamp(&self) -> Option<i64>
fn last_modified_timestamp(&self) -> Option<i64>
The UNIX timestamp of when the file was last modified.
Source§impl IntoResponse<WebEmbedableFile<DynamicFile>> for DynamicFile
impl IntoResponse<WebEmbedableFile<DynamicFile>> for DynamicFile
Source§fn into_response(self) -> EmbedResponse<WebEmbedableFile<DynamicFile>>
fn into_response(self) -> EmbedResponse<WebEmbedableFile<DynamicFile>>
A specialized version of
Into::into
.Source§impl IntoResponse<WebEmbedableFile<DynamicFile>> for Option<DynamicFile>
impl IntoResponse<WebEmbedableFile<DynamicFile>> for Option<DynamicFile>
Source§fn into_response(self) -> EmbedResponse<WebEmbedableFile<DynamicFile>>
fn into_response(self) -> EmbedResponse<WebEmbedableFile<DynamicFile>>
A specialized version of
Into::into
.Source§impl IntoResponse<WebEmbedableFile<EmbeddedFile>> for EmbeddedFile
impl IntoResponse<WebEmbedableFile<EmbeddedFile>> for EmbeddedFile
Source§fn into_response(self) -> EmbedResponse<WebEmbedableFile<EmbeddedFile>>
fn into_response(self) -> EmbedResponse<WebEmbedableFile<EmbeddedFile>>
A specialized version of
Into::into
.Source§impl IntoResponse<WebEmbedableFile<EmbeddedFile>> for Option<EmbeddedFile>
impl IntoResponse<WebEmbedableFile<EmbeddedFile>> for Option<EmbeddedFile>
Source§fn into_response(self) -> EmbedResponse<WebEmbedableFile<EmbeddedFile>>
fn into_response(self) -> EmbedResponse<WebEmbedableFile<EmbeddedFile>>
A specialized version of
Into::into
.Auto Trait Implementations§
impl<T> Freeze for WebEmbedableFile<T>where
T: Freeze,
impl<T> RefUnwindSafe for WebEmbedableFile<T>where
T: RefUnwindSafe,
impl<T> Send for WebEmbedableFile<T>where
T: Send,
impl<T> Sync for WebEmbedableFile<T>where
T: Sync,
impl<T> Unpin for WebEmbedableFile<T>where
T: Unpin,
impl<T> UnwindSafe for WebEmbedableFile<T>where
T: UnwindSafe,
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