pub struct Socket(/* private fields */);Expand description
A raw socket handle that ensures OS_close is called on drop.
Implementations§
Source§impl Socket
impl Socket
Sourcepub fn bind_address(&self, addr: &SocketAddr) -> Result<()>
pub fn bind_address(&self, addr: &SocketAddr) -> Result<()>
Binds a socket to a given local address.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Socket
impl RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin for Socket
impl UnsafeUnpin for Socket
impl UnwindSafe for Socket
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