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§

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more