pub struct Address {
pub ip: String,
pub port: i32,
}Expand description
IP address and port pair.
Fields§
§ip: String§port: i32Implementations§
Source§impl Address
impl Address
Sourcepub fn to_socket_addr(&self) -> Option<SocketAddr>
pub fn to_socket_addr(&self) -> Option<SocketAddr>
Parse this address into a std::net::SocketAddr. Returns None if
the IP string or port value cannot be converted.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnsafeUnpin for Address
impl UnwindSafe for Address
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