pub struct StaticFilesOpt {
pub root: Option<PathBuf>,
pub canonicalize_uri: Option<bool>,
pub index_file: Option<Vec<String>>,
pub page_404: Option<String>,
pub precompressed: Option<Vec<CompressionAlgorithm>>,
pub declare_charset: Option<String>,
pub declare_charset_types: Option<Vec<MimeMatch>>,
}
Expand description
Command line options of the static files module
Fields§
§root: Option<PathBuf>
The root directory.
canonicalize_uri: Option<bool>
Redirect /file%2e.txt to /file.txt and /dir to /dir/.
index_file: Option<Vec<String>>
Index file to look for when displaying a directory. This command line flag can be specified multiple times.
page_404: Option<String>
URI path of the page to display instead of the default Not Found page, e.g. /404.html
precompressed: Option<Vec<CompressionAlgorithm>>
File extension to check when looking for pre-compressed versions of a file. This command line flag can be specified multiple times. Supported file extensions are gz (gzip), zz (zlib deflate), z (compress), br (Brotli), zst (Zstandard).
declare_charset: Option<String>
The character set to declare for text files.
declare_charset_types: Option<Vec<MimeMatch>>
MIME type that the declare_charset
setting should apply to. This command line flag can be
specified multiple times.
Trait Implementations§
Source§impl Args for StaticFilesOpt
impl Args for StaticFilesOpt
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl CommandFactory for StaticFilesOpt
impl CommandFactory for StaticFilesOpt
Source§impl Debug for StaticFilesOpt
impl Debug for StaticFilesOpt
Source§impl Default for StaticFilesOpt
impl Default for StaticFilesOpt
Source§fn default() -> StaticFilesOpt
fn default() -> StaticFilesOpt
Returns the “default value” for a type. Read more
Source§impl FromArgMatches for StaticFilesOpt
impl FromArgMatches for StaticFilesOpt
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§impl Parser for StaticFilesOpt
impl Parser for StaticFilesOpt
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for StaticFilesOpt
impl RefUnwindSafe for StaticFilesOpt
impl Send for StaticFilesOpt
impl Sync for StaticFilesOpt
impl Unpin for StaticFilesOpt
impl UnwindSafe for StaticFilesOpt
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