pub struct Socket<'umem> { /* private fields */ }Expand description
An AF_XDP socket.
More details can be found in the docs
Implementations§
Source§impl Socket<'_>
impl Socket<'_>
Sourcepub fn new<'a, 'umem>(
config: SocketConfig,
umem: &mut Umem<'umem>,
if_name: &'a str,
queue_id: u32,
) -> Result<(TxQueue<'umem>, RxQueue<'umem>), SocketCreateError>
pub fn new<'a, 'umem>( config: SocketConfig, umem: &mut Umem<'umem>, if_name: &'a str, queue_id: u32, ) -> Result<(TxQueue<'umem>, RxQueue<'umem>), SocketCreateError>
Create and bind a new AF_XDP socket to a given interface and queue id.
May require root permissions to create and bind.
Trait Implementations§
Auto Trait Implementations§
impl<'umem> Freeze for Socket<'umem>
impl<'umem> RefUnwindSafe for Socket<'umem>
impl<'umem> Send for Socket<'umem>
impl<'umem> Sync for Socket<'umem>
impl<'umem> Unpin for Socket<'umem>
impl<'umem> UnwindSafe for Socket<'umem>
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