Struct rust_embed_for_web_utils::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. In release builds or with the always-embed
flag, you’ll get EmbeddedFile
s.
You should interface with this object using the EmbedableFile
trait, which
is implemented for both the embedded and dynamic files.
Trait Implementations§
source§impl Clone for EmbeddedFile
impl Clone for EmbeddedFile
source§fn clone(&self) -> EmbeddedFile
fn clone(&self) -> EmbeddedFile
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 moresource§impl Debug for EmbeddedFile
impl Debug for EmbeddedFile
source§impl EmbedableFile for EmbeddedFile
impl EmbedableFile for EmbeddedFile
type Data = &'static [u8]
type Meta = &'static str
source§fn data_gzip(&self) -> Option<Self::Data>
fn data_gzip(&self) -> Option<Self::Data>
The contents of the file, compressed with gzip. Read more
source§fn data_br(&self) -> Option<Self::Data>
fn data_br(&self) -> Option<Self::Data>
The contents of the file, compressed with brotli. Read more
source§fn last_modified(&self) -> Option<Self::Meta>
fn last_modified(&self) -> Option<Self::Meta>
The rfc2822 encoded last modified date. This is the format you use for
Last-Modified
headers.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§fn hash(&self) -> Self::Meta
fn hash(&self) -> Self::Meta
The hash value for the file. This is a base85 encoded sha256 hash.