pub struct RawSocket { /* private fields */ }
Implementations§
Source§impl RawSocket
impl RawSocket
pub fn new( domain: Domain, kind: Type, protocol: Option<Protocol>, ) -> Result<Self>
pub async fn bind<A: ToSocketAddrs>(&self, addr: A) -> Result<()>
pub fn local_addr(&self) -> Result<SocketAddr>
pub async fn recv_from(&self, buf: &mut [u8]) -> Result<(usize, SocketAddr)>
pub async fn recv_msg( &self, data: &[IoSliceMut<'_>], ctrl: Option<&mut [u8]>, ) -> Result<(usize, SocketAddr)>
pub async fn send_to<A: ToSocketAddrs>( &self, buf: &[u8], addr: A, ) -> Result<usize>
pub async fn send_msg<A: ToSocketAddrs>( &self, addr: A, data: &[IoSlice<'_>], ctrl: Option<&[u8]>, ) -> Result<usize>
pub fn get_sockopt<O: Opt>(&self, level: Level, name: Name) -> Result<O>
pub fn set_sockopt<O: Opt>( &self, level: Level, name: Name, value: &O, ) -> Result<()>
Auto Trait Implementations§
impl Freeze for RawSocket
impl !RefUnwindSafe for RawSocket
impl Send for RawSocket
impl Sync for RawSocket
impl Unpin for RawSocket
impl !UnwindSafe for RawSocket
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