pub struct DevServerConfig {
pub port: u16,
pub host: String,
pub auto_open: bool,
pub static_dirs: Vec<String>,
pub headers: HashMap<String, String>,
}
Fields§
§port: u16
Port for the development server (default: 3000)
host: String
Host for the development server (default: “127.0.0.1”)
auto_open: bool
Whether to open browser automatically (default: true)
static_dirs: Vec<String>
Additional static file directories to serve
headers: HashMap<String, String>
Custom headers to add to responses
Trait Implementations§
Source§impl Clone for DevServerConfig
impl Clone for DevServerConfig
Source§fn clone(&self) -> DevServerConfig
fn clone(&self) -> DevServerConfig
Returns a copy 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 DevServerConfig
impl Debug for DevServerConfig
Source§impl Default for DevServerConfig
impl Default for DevServerConfig
Source§impl<'de> Deserialize<'de> for DevServerConfig
impl<'de> Deserialize<'de> for DevServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DevServerConfig
impl RefUnwindSafe for DevServerConfig
impl Send for DevServerConfig
impl Sync for DevServerConfig
impl Unpin for DevServerConfig
impl UnwindSafe for DevServerConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more