pub trait Metadata: Send + 'static {
// Required methods
fn is_dir(&self) -> bool;
fn modified(&self) -> Result<SystemTime>;
fn len(&self) -> u64;
// Provided method
fn is_empty(&self) -> bool { ... }
}Available on crate feature
fs only.Expand description
Trait for file metadata.
This is the information ServeDir needs about a file or directory without opening it.
Required Methods§
Sourcefn modified(&self) -> Result<SystemTime>
fn modified(&self) -> Result<SystemTime>
Returns the last modification time, if available.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".