pub struct CachedFile {
pub content: Bytes,
pub mime_type: String,
pub etag: String,
pub last_modified: u64,
pub created_at: Instant,
pub ttl: Duration,
pub size: usize,
}Expand description
A cached file with metadata
Fields§
§content: BytesFile content
mime_type: StringMIME type
etag: StringETag for cache validation
last_modified: u64Last modified timestamp (Unix timestamp)
created_at: InstantWhen this cache entry was created
ttl: DurationTime-to-live duration
size: usizeFile size in bytes
Implementations§
Source§impl CachedFile
impl CachedFile
Trait Implementations§
Source§impl Clone for CachedFile
impl Clone for CachedFile
Source§fn clone(&self) -> CachedFile
fn clone(&self) -> CachedFile
Returns a duplicate 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 moreAuto Trait Implementations§
impl !Freeze for CachedFile
impl RefUnwindSafe for CachedFile
impl Send for CachedFile
impl Sync for CachedFile
impl Unpin for CachedFile
impl UnsafeUnpin for CachedFile
impl UnwindSafe for CachedFile
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