pub struct ServerCtx { /* private fields */ }Expand description
All variables and references associated with SERVER_ prefix
and other server attributes.
Implementations§
Source§impl ServerCtx
impl ServerCtx
Sourcepub fn document_root<S>(self, document_root: S) -> ServerCtx
pub fn document_root<S>(self, document_root: S) -> ServerCtx
Assign value for DOCUMENT_ROOT variable
Sourcepub fn server_admin<S>(self, server_admin: S) -> ServerCtx
pub fn server_admin<S>(self, server_admin: S) -> ServerCtx
Assign value for SERVER_ADMIN variable
Sourcepub fn server_name<S>(self, server_name: S) -> ServerCtx
pub fn server_name<S>(self, server_name: S) -> ServerCtx
Assign value for SERVER_NAME variable
Sourcepub fn server_protocol<S>(self, server_protocol: S) -> ServerCtx
pub fn server_protocol<S>(self, server_protocol: S) -> ServerCtx
Assign value for SERVER_PROTOCOL variable
Sourcepub fn server_software<S>(self, server_software: S) -> ServerCtx
pub fn server_software<S>(self, server_software: S) -> ServerCtx
Assign value for SERVER_SOFTWARE variable
Sourcepub fn server_addr<A>(self, server_addr: A) -> Result<ServerCtx, Error>where
A: ToSocketAddrs,
pub fn server_addr<A>(self, server_addr: A) -> Result<ServerCtx, Error>where
A: ToSocketAddrs,
Assign value for SERVER_ADDR, and SERVER_PORT variables.
Sourcepub fn maybe_server_addr<A>(
self,
server_addr: Option<A>,
) -> Result<ServerCtx, Error>where
A: ToSocketAddrs,
pub fn maybe_server_addr<A>(
self,
server_addr: Option<A>,
) -> Result<ServerCtx, Error>where
A: ToSocketAddrs,
Assign value for SERVER_ADDR, and SERVER_PORT variables if address is Some.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ServerCtx
impl RefUnwindSafe for ServerCtx
impl Send for ServerCtx
impl Sync for ServerCtx
impl Unpin for ServerCtx
impl UnwindSafe for ServerCtx
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