pub struct VHostConfig {
pub host: String,
pub root: PathBuf,
pub enable_indexing: bool,
pub enable_compression: bool,
pub index_files: Vec<String>,
}Expand description
Virtual host configuration
Fields§
§host: StringHost name (domain)
root: PathBufRoot directory for this host
enable_indexing: boolEnable directory indexing
enable_compression: boolEnable compression
index_files: Vec<String>Custom index files
Implementations§
Source§impl VHostConfig
impl VHostConfig
Sourcepub fn new(host: impl Into<String>, root: impl Into<PathBuf>) -> Self
pub fn new(host: impl Into<String>, root: impl Into<PathBuf>) -> Self
Create a new virtual host config
Sourcepub fn with_indexing(self, enabled: bool) -> Self
pub fn with_indexing(self, enabled: bool) -> Self
Set enable indexing
Sourcepub fn with_compression(self, enabled: bool) -> Self
pub fn with_compression(self, enabled: bool) -> Self
Set enable compression
Sourcepub fn with_index_files(self, files: Vec<String>) -> Self
pub fn with_index_files(self, files: Vec<String>) -> Self
Set index files
Trait Implementations§
Source§impl Clone for VHostConfig
impl Clone for VHostConfig
Source§fn clone(&self) -> VHostConfig
fn clone(&self) -> VHostConfig
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 Debug for VHostConfig
impl Debug for VHostConfig
Source§impl Default for VHostConfig
impl Default for VHostConfig
Source§impl PartialEq for VHostConfig
impl PartialEq for VHostConfig
impl StructuralPartialEq for VHostConfig
Auto Trait Implementations§
impl Freeze for VHostConfig
impl RefUnwindSafe for VHostConfig
impl Send for VHostConfig
impl Sync for VHostConfig
impl Unpin for VHostConfig
impl UnsafeUnpin for VHostConfig
impl UnwindSafe for VHostConfig
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