Struct hyper_staticfile::vfs::FileWithMetadata
source · pub struct FileWithMetadata<F = File> {
pub handle: F,
pub size: u64,
pub modified: Option<SystemTime>,
pub is_dir: bool,
}
Expand description
Open file handle with metadata.
This struct exists because we want to abstract away tokio File
, but need to use
File
-specific operations to find the metadata and fill the additional fields here.
This struct is eventually converted to a ResolvedFile
.
Fields§
§handle: F
Open file handle.
size: u64
Size in bytes.
modified: Option<SystemTime>
Last modification time.
is_dir: bool
Whether this is a directory.
Trait Implementations§
Auto Trait Implementations§
impl<F> RefUnwindSafe for FileWithMetadata<F>where F: RefUnwindSafe,
impl<F> Send for FileWithMetadata<F>where F: Send,
impl<F> Sync for FileWithMetadata<F>where F: Sync,
impl<F> Unpin for FileWithMetadata<F>where F: Unpin,
impl<F> UnwindSafe for FileWithMetadata<F>where F: UnwindSafe,
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