pub trait FileServeConfig: Send + Unpin {
    // Provided methods
    fn max_buffer_size() -> u64 { ... }
    fn content_disposition_map(typ: Name<'_>) -> DispositionType { ... }
    fn is_use_etag(_path: &Path) -> bool { ... }
    fn is_use_last_modifier(_path: &Path) -> bool { ... }
}
Expand description

Describes how to serve file

Provided Methods§

source

fn max_buffer_size() -> u64

Returns maximum size for buffer to read file.

By default 64kb

source

fn content_disposition_map(typ: Name<'_>) -> DispositionType

Describes mapping for mime type to content disposition header

By default IMAGE, TEXT and VIDEO are mapped to Inline. Others are mapped to Attachment

source

fn is_use_etag(_path: &Path) -> bool

Specifies whether ETag should be used for caching

Provides path to the file, relative to File Service directory

By default it is true

source

fn is_use_last_modifier(_path: &Path) -> bool

Specifies whether Last-Modified should be used for caching

Provides path to the file, relative to File Service directory

By default it is true

Object Safety§

This trait is not object safe.

Implementors§