Struct rust_embed_for_web::EmbeddedFile
source · pub struct EmbeddedFile { /* private fields */ }
Expand description
A file embedded into the binary.
rust-embed-for-web
changes which type of file you get based on whether
it’s a debug or release build. You should likely not try to interface
directly with this type, and instead use the EmbedableFile
trait.
Trait Implementations
sourceimpl Debug for EmbeddedFile
impl Debug for EmbeddedFile
sourceimpl EmbedableFile for EmbeddedFile
impl EmbedableFile for EmbeddedFile
type Data = &'static [u8]
type Meta = &'static str
sourcefn name(&self) -> <EmbeddedFile as EmbedableFile>::Meta
fn name(&self) -> <EmbeddedFile as EmbedableFile>::Meta
The name of the embedded file.
sourcefn data(&self) -> <EmbeddedFile as EmbedableFile>::Data
fn data(&self) -> <EmbeddedFile as EmbedableFile>::Data
The contents of the embedded file.
sourcefn data_gzip(&self) -> Option<<EmbeddedFile as EmbedableFile>::Data>
fn data_gzip(&self) -> Option<<EmbeddedFile as EmbedableFile>::Data>
The contents of the file, compressed with gzip. Read more
sourcefn data_br(&self) -> Option<<EmbeddedFile as EmbedableFile>::Data>
fn data_br(&self) -> Option<<EmbeddedFile as EmbedableFile>::Data>
The contents of the file, compressed with brotli. Read more
sourcefn last_modified(&self) -> Option<<EmbeddedFile as EmbedableFile>::Meta>
fn last_modified(&self) -> Option<<EmbeddedFile as EmbedableFile>::Meta>
The rfc2822 encoded last modified date.
sourcefn last_modified_timestamp(&self) -> Option<i64>
fn last_modified_timestamp(&self) -> Option<i64>
The timestamp of when the file was last modified.
sourcefn hash(&self) -> <EmbeddedFile as EmbedableFile>::Meta
fn hash(&self) -> <EmbeddedFile as EmbedableFile>::Meta
The hash value for the file.
sourcefn etag(&self) -> <EmbeddedFile as EmbedableFile>::Meta
fn etag(&self) -> <EmbeddedFile as EmbedableFile>::Meta
The ETag value for the file, based on its hash.
sourcefn mime_type(&self) -> Option<<EmbeddedFile as EmbedableFile>::Meta>
fn mime_type(&self) -> Option<<EmbeddedFile as EmbedableFile>::Meta>
The mime type for the file, if one is or can be guessed from the file.
Auto Trait Implementations
impl RefUnwindSafe for EmbeddedFile
impl Send for EmbeddedFile
impl Sync for EmbeddedFile
impl Unpin for EmbeddedFile
impl UnwindSafe for EmbeddedFile
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more