Struct rust_embed_for_web_utils::Metadata
source · [−]pub struct Metadata { /* private fields */ }
Expand description
Metadata about an embedded file
Implementations
sourceimpl Metadata
impl Metadata
sourcepub fn sha256_hash(&self) -> &str
pub fn sha256_hash(&self) -> &str
The SHA256 hash of the file contents, base64 encoded.
sourcepub fn etag(&self) -> &str
pub fn etag(&self) -> &str
The sha256_hash
, surrounded by quotes. This is the format required in
ETag
headers.
sourcepub fn last_modified(&self) -> Option<&str>
pub fn last_modified(&self) -> Option<&str>
The last modified date in the rfc2822 format. This is the format required
in Last-Modified
headers.
This may be None on some platforms that don’t support last modified timestamps.
pub fn mime_type(&self) -> Option<&str>
Auto Trait Implementations
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnwindSafe for Metadata
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