pub struct NetPair {
pub local: SocketAddr,
pub remote: SocketAddr,
}Expand description
NetPair is a pair between remote addr and local addr. This is for solving problems with multi-ip-addresses system.
Fields§
§local: SocketAddr§remote: SocketAddrImplementations§
Source§impl NetPair
impl NetPair
pub fn new(local: SocketAddr, remote: SocketAddr) -> Self
pub fn new_str(local: &str, remote: &str) -> Result<Self, AddrParseError>
Trait Implementations§
Source§impl Ord for NetPair
impl Ord for NetPair
Source§impl PartialOrd for NetPair
impl PartialOrd for NetPair
impl Copy for NetPair
impl Eq for NetPair
impl StructuralPartialEq for NetPair
Auto Trait Implementations§
impl Freeze for NetPair
impl RefUnwindSafe for NetPair
impl Send for NetPair
impl Sync for NetPair
impl Unpin for NetPair
impl UnwindSafe for NetPair
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