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§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NetworkConfig
impl Debug for NetworkConfig
Source§impl Default for NetworkConfig
impl Default for NetworkConfig
Source§fn default() -> NetworkConfig
fn default() -> NetworkConfig
Source§impl<'de> Deserialize<'de> for NetworkConfigwhere
NetworkConfig: Default,
impl<'de> Deserialize<'de> for NetworkConfigwhere
NetworkConfig: Default,
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>,
Source§impl Hash for NetworkConfig
impl Hash for NetworkConfig
Source§impl Ord for NetworkConfig
impl Ord for NetworkConfig
Source§fn cmp(&self, other: &NetworkConfig) -> Ordering
fn cmp(&self, other: &NetworkConfig) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NetworkConfig
impl PartialEq for NetworkConfig
Source§impl PartialOrd for NetworkConfig
impl PartialOrd for NetworkConfig
Source§impl Serialize for NetworkConfig
impl Serialize for NetworkConfig
impl Eq for NetworkConfig
impl StructuralPartialEq for NetworkConfig
Auto Trait Implementations§
impl Freeze for NetworkConfig
impl RefUnwindSafe for NetworkConfig
impl Send for NetworkConfig
impl Sync for NetworkConfig
impl Unpin for NetworkConfig
impl UnwindSafe for NetworkConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.