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§
Sourcefn max_buffer_size() -> u64
fn max_buffer_size() -> u64
Returns maximum size for buffer to read file.
By default 64kb
Sourcefn content_disposition_map(typ: Name<'_>) -> DispositionType
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
Sourcefn is_use_etag(_path: &Path) -> bool
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
Sourcefn is_use_last_modifier(_path: &Path) -> bool
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
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.