pub struct NetworkConfig { /* private fields */ }Implementations§
Source§impl NetworkConfig
impl NetworkConfig
pub fn new() -> Self
Sourcepub fn open_on_startup(self) -> Self
pub fn open_on_startup(self) -> Self
toggle the open on startup flag
Sourcepub const fn address(&self) -> &NetworkAddr
pub const fn address(&self) -> &NetworkAddr
returns an immutable reference to the network address
Sourcepub const fn address_mut(&mut self) -> &mut NetworkAddr
pub const fn address_mut(&mut self) -> &mut NetworkAddr
returns a mutable reference to the network address
Sourcepub fn basepath_mut(&mut self) -> Option<&mut String>
pub fn basepath_mut(&mut self) -> Option<&mut String>
returns a mutable reference to the basepath; if any.
Sourcepub fn max_connections(&self) -> Option<u16>
pub fn max_connections(&self) -> Option<u16>
returns the maximum number of connections; if any.
Sourcepub fn open(&self) -> bool
pub fn open(&self) -> bool
returns true if the application should automatically open the browser upon startup
Sourcepub fn as_socket_addr(&self) -> SocketAddr
pub fn as_socket_addr(&self) -> SocketAddr
converts the network address into a SocketAddr
Sourcepub fn set_address(&mut self, address: NetworkAddr) -> &mut Self
pub fn set_address(&mut self, address: NetworkAddr) -> &mut Self
update the address then return a mutable reference to the current instance
Sourcepub fn with_address(self, address: NetworkAddr) -> Self
pub fn with_address(self, address: NetworkAddr) -> Self
consumes the current instance to create another with the given address
Sourcepub fn set_basepath<T: ToString>(&mut self, basepath: T) -> &mut Self
pub fn set_basepath<T: ToString>(&mut self, basepath: T) -> &mut Self
update the basepath then return a mutable reference to the current instance
Sourcepub fn with_basepath<T: ToString>(self, basepath: T) -> Self
pub fn with_basepath<T: ToString>(self, basepath: T) -> Self
consumes the current instance to create another with the given basepath
Sourcepub fn set_max_connections(&mut self, max_connections: u16) -> &mut Self
pub fn set_max_connections(&mut self, max_connections: u16) -> &mut Self
update the max_connections then return a mutable reference to the current instance
Sourcepub fn with_max_connections(self, max_connections: u16) -> Self
pub fn with_max_connections(self, max_connections: u16) -> Self
consumes the current instance to create another with the given max_connections
Sourcepub fn set_open(&mut self, open: bool) -> &mut Self
pub fn set_open(&mut self, open: bool) -> &mut Self
update the open flag then return a mutable reference to the current instance
Sourcepub fn with_open(self, open: bool) -> Self
pub fn with_open(self, open: bool) -> Self
consumes the current instance to create another with the given open flag
Sourcepub fn set_host<T: ToString>(&mut self, host: T) -> &mut Self
pub fn set_host<T: ToString>(&mut self, host: T) -> &mut Self
updates the hostname of the current address
Sourcepub fn with_host<T: ToString>(self, host: T) -> Self
pub fn with_host<T: ToString>(self, host: T) -> Self
update the host then return a mutable reference to the current instance
Trait Implementations§
Source§impl Clone for NetworkConfig
impl Clone for NetworkConfig
Source§fn clone(&self) -> NetworkConfig
fn clone(&self) -> NetworkConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more