#[repr(C, align(8))]pub struct XdpDesc {
pub addr: u64,
pub len: u32,
pub options: u32,
}Expand description
AF_XDP 内核 xdp_desc 结构的 Rust 表示
严格对应内核 ABI,size = 16 bytes。
Fields§
§addr: u64UMEM 中的偏移地址(帧起始地址 = umem_base + addr)
len: u32数据长度(字节)
options: u32选项标志(XDP_TX_META_DATA 等)
Implementations§
Trait Implementations§
impl Copy for XdpDesc
impl Eq for XdpDesc
impl StructuralPartialEq for XdpDesc
Auto Trait Implementations§
impl Freeze for XdpDesc
impl RefUnwindSafe for XdpDesc
impl Send for XdpDesc
impl Sync for XdpDesc
impl Unpin for XdpDesc
impl UnsafeUnpin for XdpDesc
impl UnwindSafe for XdpDesc
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.