pub struct EmbeddedAsset {
pub data: Cow<'static, [u8]>,
pub content_type: String,
pub etag: Option<String>,
pub last_modified: Option<u64>,
}Expand description
A single embedded file’s payload + metadata. Mirrors what rust_embed::File
exposes, but kept framework-owned so the runtime API stays stable if we
later swap the embedder.
Fields§
§data: Cow<'static, [u8]>§content_type: StringMIME type. Caller is expected to pre-resolve this (e.g. via
mime_guess::from_path) so the framework doesn’t have to guess.
etag: Option<String>Optional strong validator. When present, the framework emits an ETag
header and short-circuits matching If-None-Match requests with 304.
last_modified: Option<u64>Optional Unix-seconds last-modified timestamp from the embedder.
Auto Trait Implementations§
impl Freeze 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more