pub struct IpListenEndpoint {
pub addr: Option<Address>,
pub port: u16,
}
Expand description
An internet endpoint address for listening.
In contrast with Endpoint
, ListenEndpoint
allows not specifying the address,
in order to listen on a given port at all our addresses.
An endpoint can be constructed from a port, in which case the address is unspecified.
Fields§
§addr: Option<Address>
§port: u16
Implementations§
Source§impl ListenEndpoint
impl ListenEndpoint
Sourcepub const fn is_specified(&self) -> bool
pub const fn is_specified(&self) -> bool
Query whether the endpoint has a specified address and port.
Trait Implementations§
Source§impl Clone for ListenEndpoint
impl Clone for ListenEndpoint
Source§fn clone(&self) -> ListenEndpoint
fn clone(&self) -> ListenEndpoint
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 ListenEndpoint
impl Debug for ListenEndpoint
Source§impl Default for ListenEndpoint
impl Default for ListenEndpoint
Source§fn default() -> ListenEndpoint
fn default() -> ListenEndpoint
Returns the “default value” for a type. Read more
Source§impl Display for ListenEndpoint
impl Display for ListenEndpoint
Source§impl Format for ListenEndpoint
impl Format for ListenEndpoint
Source§impl<T> From<(T, u16)> for ListenEndpoint
impl<T> From<(T, u16)> for ListenEndpoint
Source§fn from(_: (T, u16)) -> ListenEndpoint
fn from(_: (T, u16)) -> ListenEndpoint
Converts to this type from the input type.
Source§impl From<Endpoint> for ListenEndpoint
impl From<Endpoint> for ListenEndpoint
Source§fn from(endpoint: Endpoint) -> ListenEndpoint
fn from(endpoint: Endpoint) -> ListenEndpoint
Converts to this type from the input type.
Source§impl From<SocketAddr> for ListenEndpoint
impl From<SocketAddr> for ListenEndpoint
Source§fn from(x: SocketAddr) -> ListenEndpoint
fn from(x: SocketAddr) -> ListenEndpoint
Converts to this type from the input type.
Source§impl From<SocketAddrV4> for ListenEndpoint
impl From<SocketAddrV4> for ListenEndpoint
Source§fn from(x: SocketAddrV4) -> ListenEndpoint
fn from(x: SocketAddrV4) -> ListenEndpoint
Converts to this type from the input type.
Source§impl From<SocketAddrV6> for ListenEndpoint
impl From<SocketAddrV6> for ListenEndpoint
Source§fn from(x: SocketAddrV6) -> ListenEndpoint
fn from(x: SocketAddrV6) -> ListenEndpoint
Converts to this type from the input type.
Source§impl From<u16> for ListenEndpoint
impl From<u16> for ListenEndpoint
Source§fn from(port: u16) -> ListenEndpoint
fn from(port: u16) -> ListenEndpoint
Converts to this type from the input type.
Source§impl Hash for ListenEndpoint
impl Hash for ListenEndpoint
Source§impl Ord for ListenEndpoint
impl Ord for ListenEndpoint
Source§fn cmp(&self, other: &ListenEndpoint) -> Ordering
fn cmp(&self, other: &ListenEndpoint) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ListenEndpoint
impl PartialEq for ListenEndpoint
Source§impl PartialOrd for ListenEndpoint
impl PartialOrd for ListenEndpoint
impl Copy for ListenEndpoint
impl Eq for ListenEndpoint
impl StructuralPartialEq for ListenEndpoint
Auto Trait Implementations§
impl Freeze for ListenEndpoint
impl RefUnwindSafe for ListenEndpoint
impl Send for ListenEndpoint
impl Sync for ListenEndpoint
impl Unpin for ListenEndpoint
impl UnwindSafe for ListenEndpoint
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)