pub struct NetEndpoint {
pub addr: SocketAddr,
pub protocol: TransportProtocol,
}Expand description
A full transport endpoint: socket address plus transport protocol.
Fields§
§addr: SocketAddrIP address and port.
protocol: TransportProtocolTransport protocol on that socket.
Implementations§
Source§impl NetEndpoint
impl NetEndpoint
pub const fn new(addr: SocketAddr, protocol: TransportProtocol) -> Self
pub const fn udp(addr: SocketAddr) -> Self
pub const fn tcp(addr: SocketAddr) -> Self
Trait Implementations§
Source§impl Clone for NetEndpoint
impl Clone for NetEndpoint
Source§fn clone(&self) -> NetEndpoint
fn clone(&self) -> NetEndpoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NetEndpoint
Source§impl Debug for NetEndpoint
impl Debug for NetEndpoint
impl Eq for NetEndpoint
Source§impl Hash for NetEndpoint
impl Hash for NetEndpoint
Source§impl PartialEq for NetEndpoint
impl PartialEq for NetEndpoint
impl StructuralPartialEq for NetEndpoint
Auto Trait Implementations§
impl Freeze for NetEndpoint
impl RefUnwindSafe for NetEndpoint
impl Send for NetEndpoint
impl Sync for NetEndpoint
impl Unpin for NetEndpoint
impl UnsafeUnpin for NetEndpoint
impl UnwindSafe for NetEndpoint
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