pub struct Bound { /* private fields */ }Expand description
A listener already bound, the address it holds, and the face its judgement gave it.
The face travels with the listener because it is the verdict about
this very address: a face carried apart from its listener could be
served on a socket it was never judged for. The address is read once,
at bind, because a city asked to serve on :0 holds a port only the
listener knows (wire D16).
Implementations§
Source§impl Bound
impl Bound
Sourcepub fn local_addr(&self) -> SocketAddr
pub fn local_addr(&self) -> SocketAddr
The address the listener holds: the port the operating system
gave when bind was asked for port 0, the one asked for
otherwise. Every reader that hands the city’s address on reads
this one, never the address bind was given.
Auto Trait Implementations§
impl !Freeze for Bound
impl RefUnwindSafe for Bound
impl Send for Bound
impl Sync for Bound
impl Unpin for Bound
impl UnsafeUnpin for Bound
impl UnwindSafe for Bound
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