pub struct DefaultConfig;
Expand description
Default configuration
Trait Implementations§
Source§impl Clone for DefaultConfig
impl Clone for DefaultConfig
Source§fn clone(&self) -> DefaultConfig
fn clone(&self) -> DefaultConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl FileServeConfig for DefaultConfig
impl FileServeConfig for DefaultConfig
Source§fn max_buffer_size() -> u64
fn max_buffer_size() -> u64
Returns maximum size for buffer to read file. Read more
Source§fn content_disposition_map(typ: Name<'_>) -> DispositionType
fn content_disposition_map(typ: Name<'_>) -> DispositionType
Describes mapping for mime type to content disposition header Read more
Source§impl StaticFileConfig for DefaultConfig
impl StaticFileConfig for DefaultConfig
Source§type FileService = DefaultConfig
type FileService = DefaultConfig
File serve configuration
Source§type DirService = DefaultConfig
type DirService = DefaultConfig
Directory serve configuration
Source§fn is_method_allowed(method: &Method) -> bool
fn is_method_allowed(method: &Method) -> bool
Returns whether specified method is allowed for use.
By default allows
HEAD
and GET
Source§fn router_prefix(&self) -> &str
fn router_prefix(&self) -> &str
Specifies router prefix. Read more
Source§fn index_file(&self, _path: &Path) -> Option<&Path>
fn index_file(&self, _path: &Path) -> Option<&Path>
Returns name of index file to show. Read more
Source§fn handle_directory(&self, _path: &Path) -> bool
fn handle_directory(&self, _path: &Path) -> bool
Returns whether directory should be listed on access Read more
Source§fn handle_not_found(
&self,
_path: &Path,
_out_headers: &mut HeaderMap,
) -> (StatusCode, Bytes)
fn handle_not_found( &self, _path: &Path, _out_headers: &mut HeaderMap, ) -> (StatusCode, Bytes)
Handles entry that hasn’t been found. Read more
impl Copy for DefaultConfig
Auto Trait Implementations§
impl Freeze for DefaultConfig
impl RefUnwindSafe for DefaultConfig
impl Send for DefaultConfig
impl Sync for DefaultConfig
impl Unpin for DefaultConfig
impl UnwindSafe for DefaultConfig
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