pub struct ServerOptions {
pub listen_addr: String,
pub listen_port: i16,
}Fields§
§listen_addr: String§listen_port: i16Implementations§
Source§impl ServerOptions
impl ServerOptions
pub fn new() -> ServerOptions
pub fn with_listen_addr(&self, listen_addr: &str) -> ServerOptions
pub fn try_with_listen_addr( &self, listen_addr: &str, ) -> Result<ServerOptions, ConfigCheckError>
pub fn with_listen_port(&self, listen_port: i16) -> ServerOptions
pub fn try_with_listen_port( &self, listen_port: i16, ) -> Result<ServerOptions, ConfigCheckError>
Trait Implementations§
Source§impl Clone for ServerOptions
impl Clone for ServerOptions
Source§fn clone(&self) -> ServerOptions
fn clone(&self) -> ServerOptions
Returns a duplicate 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 ConfigCheck for ServerOptions
impl ConfigCheck for ServerOptions
fn check(&self) -> Result<ServerOptions, ConfigCheckError>
Source§impl Debug for ServerOptions
impl Debug for ServerOptions
Source§impl Default for ServerOptions
impl Default for ServerOptions
Source§fn default() -> ServerOptions
fn default() -> ServerOptions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServerOptions
impl<'de> Deserialize<'de> for ServerOptions
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 ServerOptions
impl RefUnwindSafe for ServerOptions
impl Send for ServerOptions
impl Sync for ServerOptions
impl Unpin for ServerOptions
impl UnwindSafe for ServerOptions
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