pub struct EmbeddedFile {
pub path: &'static str,
pub bytes: &'static [u8],
pub hash: &'static str,
pub br: Option<&'static [u8]>,
pub gz: Option<&'static [u8]>,
}Expand description
One embedded file. path is relative to its directory and uses /.
Fields§
§path: &'static str§bytes: &'static [u8]§hash: &'static strContent hash (next_rust_assets::content_hash), used for ETags and
to validate hashed asset URLs.
br: Option<&'static [u8]>The file compressed with Brotli at build time, when that is smaller.
gz: Option<&'static [u8]>The file compressed with gzip at build time, when that is smaller.
Trait Implementations§
Source§impl Clone for EmbeddedFile
impl Clone for EmbeddedFile
Source§fn clone(&self) -> EmbeddedFile
fn clone(&self) -> EmbeddedFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EmbeddedFile
Auto Trait Implementations§
impl Forget for EmbeddedFile
impl Freeze for EmbeddedFile
impl Move for EmbeddedFile
impl RefUnwindSafe for EmbeddedFile
impl Send for EmbeddedFile
impl Sync for EmbeddedFile
impl Unpin for EmbeddedFile
impl UnsafeUnpin for EmbeddedFile
impl UnwindSafe for EmbeddedFile
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