pub struct Config {
pub dir: PathBuf,
pub ip: IpAddr,
pub port: u16,
pub headers: Vec<String>,
pub index: String,
pub base: String,
}Expand description
Configuration for the server
Fields§
§dir: PathBufDirectory to serve and watch
ip: IpAddrIP address to bind to
port: u16Port to listen on
headers: Vec<String>Additional HTTP headers, as Name: value strings
index: StringDefault file served for directory requests
base: StringURL path prefix (e.g. /app)
Empty or / serves at the root (default)
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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