Struct static_web_server::static_files::HandleOpts
source · pub struct HandleOpts<'a> {
pub method: &'a Method,
pub headers: &'a HeaderMap<HeaderValue>,
pub base_path: &'a PathBuf,
pub uri_path: &'a str,
pub index_files: &'a [&'a str],
pub uri_query: Option<&'a str>,
pub dir_listing: bool,
pub dir_listing_order: u8,
pub dir_listing_format: &'a DirListFmt,
pub redirect_trailing_slash: bool,
pub compression_static: bool,
pub ignore_hidden_files: bool,
}
Expand description
Defines all options needed by the static-files handler.
Fields§
§method: &'a Method
Request method.
headers: &'a HeaderMap<HeaderValue>
Request headers.
base_path: &'a PathBuf
Request base path.
uri_path: &'a str
Request base path.
index_files: &'a [&'a str]
Index files.
uri_query: Option<&'a str>
Request URI query.
dir_listing: bool
Available on crate feature
directory-listing
only.Directory listing feature.
dir_listing_order: u8
Available on crate feature
directory-listing
only.Directory listing order feature.
dir_listing_format: &'a DirListFmt
Available on crate feature
directory-listing
only.Directory listing format feature.
redirect_trailing_slash: bool
Redirect trailing slash feature.
compression_static: bool
Compression static feature.
Ignore hidden files feature.
Auto Trait Implementations§
impl<'a> Freeze for HandleOpts<'a>
impl<'a> RefUnwindSafe for HandleOpts<'a>
impl<'a> Send for HandleOpts<'a>
impl<'a> Sync for HandleOpts<'a>
impl<'a> Unpin for HandleOpts<'a>
impl<'a> UnwindSafe for HandleOpts<'a>
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