pub struct TcpServerSettings {
pub port: u16,
pub ip: String,
}
Expand description
The tcp server settings are everything needed to open and read from a tcp socket as an input or output stream as a tcp server
Fields§
§port: u16
§ip: String
Implementations§
Source§impl TcpServerSettings
impl TcpServerSettings
pub fn open_read_stream(&self) -> Result<ReadStream, String>
pub fn open_write_stream(&self) -> Result<WriteStream, String>
Trait Implementations§
Source§impl Clone for TcpServerSettings
impl Clone for TcpServerSettings
Source§fn clone(&self) -> TcpServerSettings
fn clone(&self) -> TcpServerSettings
Returns a copy 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 Debug for TcpServerSettings
impl Debug for TcpServerSettings
Source§impl Default for TcpServerSettings
impl Default for TcpServerSettings
Source§impl<'de> Deserialize<'de> for TcpServerSettings
impl<'de> Deserialize<'de> for TcpServerSettings
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
Source§impl Display for TcpServerSettings
impl Display for TcpServerSettings
Source§impl FromStr for TcpServerSettings
impl FromStr for TcpServerSettings
Source§type Err = StreamSettingsParseError
type Err = StreamSettingsParseError
The associated error which can be returned from parsing.
Source§fn from_str(s: &str) -> Result<TcpServerSettings, StreamSettingsParseError>
fn from_str(s: &str) -> Result<TcpServerSettings, StreamSettingsParseError>
Parses a string
s
to return a value of this type. Read moreSource§impl PartialEq for TcpServerSettings
impl PartialEq for TcpServerSettings
Source§impl Serialize for TcpServerSettings
impl Serialize for TcpServerSettings
impl Eq for TcpServerSettings
impl StructuralPartialEq for TcpServerSettings
Auto Trait Implementations§
impl Freeze for TcpServerSettings
impl RefUnwindSafe for TcpServerSettings
impl Send for TcpServerSettings
impl Sync for TcpServerSettings
impl Unpin for TcpServerSettings
impl UnwindSafe for TcpServerSettings
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