pub struct EmbeddedAsset {
pub path: &'static str,
pub content_type: &'static str,
pub bytes: &'static [u8],
pub immutable: bool,
}Expand description
A compile-time embedded static asset served by arks serve.
Fields§
§path: &'static str§content_type: &'static str§bytes: &'static [u8]§immutable: boolImplementations§
Source§impl EmbeddedAsset
impl EmbeddedAsset
Sourcepub fn fingerprint(&self) -> String
pub fn fingerprint(&self) -> String
Deterministic 16-hex-char FNV-1a64 fingerprint of the embedded bytes.
Sourcepub fn fingerprinted_path(&self) -> String
pub fn fingerprinted_path(&self) -> String
Fingerprinted URL path inserting .<hash> before the final extension
(e.g. /assets/app.js -> /assets/app.<fnv16>.js, /style.css -> /style.<fnv16>.css).
Trait Implementations§
Source§impl Clone for EmbeddedAsset
impl Clone for EmbeddedAsset
impl Copy for EmbeddedAsset
Auto Trait Implementations§
impl Forget for EmbeddedAsset
impl Freeze for EmbeddedAsset
impl Move for EmbeddedAsset
impl RefUnwindSafe for EmbeddedAsset
impl Send for EmbeddedAsset
impl Sync for EmbeddedAsset
impl Unpin for EmbeddedAsset
impl UnsafeUnpin for EmbeddedAsset
impl UnwindSafe for EmbeddedAsset
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