Struct sled_web::server::Config [−][src]
pub struct Config { pub addr: SocketAddr, }
Configuration for the server.
Fields
addr: SocketAddr
The socket address to which the server will bind and listen for HTTP requests.
Defaults to localhost:3000. E.g. ([127, 0, 0, 1], 3000)
.
Methods
impl Config
[src]
impl Config
pub const DEFAULT_IP: [u8; 4]
DEFAULT_IP: [u8; 4] = [127, 0, 0, 1]
The default IP address used if a socket address is not specified.
pub const DEFAULT_PORT: u16
DEFAULT_PORT: u16 = 3000
The default port used if a socket address is not specified.
pub const DEFAULT_ADDR: ([u8; 4], u16)
DEFAULT_ADDR: ([u8; 4], u16) = (<Self>::DEFAULT_IP, <Self>::DEFAULT_PORT)
The default socket address used if one is not specified.
Trait Implementations
impl Clone for Config
[src]
impl Clone for Config
fn clone(&self) -> Config
[src]
fn clone(&self) -> Config
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Config
[src]
impl Debug for Config
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Config
[src]
impl Eq for Config
impl Hash for Config
[src]
impl Hash for Config
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Config
[src]
impl PartialEq for Config