Struct resource_proxy_pingora::StaticFilesOpt
source · 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§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)
Update from iterator, exit on error.
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