Struct rustix::net::xdp::SocketAddrXdp
source · pub struct SocketAddrXdp { /* private fields */ }
Expand description
A XDP socket address.
Used to bind to XDP socket.
Not ABI compatible with struct sockaddr_xdp
Implementations§
source§impl SocketAddrXdp
impl SocketAddrXdp
sourcepub fn new(
flags: SockaddrXdpFlags,
interface_index: u32,
queue_id: u32,
share_umem_fd: u32
) -> Self
pub fn new( flags: SockaddrXdpFlags, interface_index: u32, queue_id: u32, share_umem_fd: u32 ) -> Self
Construct a new XDP address.
sourcepub fn flags(&self) -> SockaddrXdpFlags
pub fn flags(&self) -> SockaddrXdpFlags
Return flags.
sourcepub fn set_flags(&mut self, flags: SockaddrXdpFlags)
pub fn set_flags(&mut self, flags: SockaddrXdpFlags)
Set flags.
sourcepub fn interface_index(&self) -> u32
pub fn interface_index(&self) -> u32
Return interface index.
sourcepub fn set_interface_index(&mut self, interface_index: u32)
pub fn set_interface_index(&mut self, interface_index: u32)
Set interface index.
sourcepub fn set_queue_id(&mut self, queue_id: u32)
pub fn set_queue_id(&mut self, queue_id: u32)
Set queue ID.
Return shared UMEM file descriptor.
Set shared UMEM file descriptor.
Trait Implementations§
source§impl Clone for SocketAddrXdp
impl Clone for SocketAddrXdp
source§fn clone(&self) -> SocketAddrXdp
fn clone(&self) -> SocketAddrXdp
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SocketAddrXdp
impl Debug for SocketAddrXdp
source§impl Hash for SocketAddrXdp
impl Hash for SocketAddrXdp
source§impl Ord for SocketAddrXdp
impl Ord for SocketAddrXdp
source§fn cmp(&self, other: &SocketAddrXdp) -> Ordering
fn cmp(&self, other: &SocketAddrXdp) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SocketAddrXdp
impl PartialEq for SocketAddrXdp
source§fn eq(&self, other: &SocketAddrXdp) -> bool
fn eq(&self, other: &SocketAddrXdp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SocketAddrXdp
impl PartialOrd for SocketAddrXdp
source§fn partial_cmp(&self, other: &SocketAddrXdp) -> Option<Ordering>
fn partial_cmp(&self, other: &SocketAddrXdp) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for SocketAddrXdp
impl StructuralEq for SocketAddrXdp
impl StructuralPartialEq for SocketAddrXdp
Auto Trait Implementations§
impl RefUnwindSafe for SocketAddrXdp
impl Send for SocketAddrXdp
impl Sync for SocketAddrXdp
impl Unpin for SocketAddrXdp
impl UnwindSafe for SocketAddrXdp
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