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§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<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§impl PartialEq for ListenEndpoint
impl PartialEq for ListenEndpoint
Source§impl PartialOrd for ListenEndpoint
impl PartialOrd for ListenEndpoint
Source§fn partial_cmp(&self, other: &ListenEndpoint) -> Option<Ordering>
fn partial_cmp(&self, other: &ListenEndpoint) -> Option<Ordering>
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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
)