pub struct BoundSocket {
pub addrs: Vec<SocketAddr>,
pub config: EndpointPortConfig,
}
Expand description
Bound socket information after successful binding
Fields§
§addrs: Vec<SocketAddr>
Socket addresses that were successfully bound
config: EndpointPortConfig
The configuration that was used
Implementations§
Source§impl BoundSocket
impl BoundSocket
Sourcepub fn primary_addr(&self) -> Option<SocketAddr>
pub fn primary_addr(&self) -> Option<SocketAddr>
Get the primary bound address (first in the list)
Sourcepub fn all_addrs(&self) -> &[SocketAddr]
pub fn all_addrs(&self) -> &[SocketAddr]
Get all bound addresses
Trait Implementations§
Source§impl Clone for BoundSocket
impl Clone for BoundSocket
Source§fn clone(&self) -> BoundSocket
fn clone(&self) -> BoundSocket
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for BoundSocket
impl RefUnwindSafe for BoundSocket
impl Send for BoundSocket
impl Sync for BoundSocket
impl Unpin for BoundSocket
impl UnwindSafe for BoundSocket
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