Struct smoltcp::wire::IpListenEndpoint
source · 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<T: Into<Address>> From<(T, u16)> for ListenEndpoint
impl<T: Into<Address>> From<(T, u16)> for ListenEndpoint
source§fn from((addr, port): (T, u16)) -> ListenEndpoint
fn from((addr, port): (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<ListenEndpoint> for ListenEndpoint
impl PartialEq<ListenEndpoint> for ListenEndpoint
source§fn eq(&self, other: &ListenEndpoint) -> bool
fn eq(&self, other: &ListenEndpoint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ListenEndpoint> for ListenEndpoint
impl PartialOrd<ListenEndpoint> for ListenEndpoint
source§fn partial_cmp(&self, other: &ListenEndpoint) -> Option<Ordering>
fn partial_cmp(&self, other: &ListenEndpoint) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more