pub struct Socket { /* private fields */ }
Implementations§
Source§impl Socket
impl Socket
pub fn new(host: String) -> Result<Self, BindError>
pub fn set_write_timeout(&self, duration: Option<Duration>) -> Result<()>
pub fn set_read_timeout(&self, duration: Option<Duration>) -> Result<()>
pub fn send_to(&self, message: &[u8], receiver: String) -> Result<usize>
pub fn recv_from(&self, buff: &mut [u8]) -> Result<(usize, SocketAddr)>
Auto Trait Implementations§
impl Freeze for Socket
impl RefUnwindSafe for Socket
impl Send for Socket
impl Sync for Socket
impl Unpin 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