pub struct LinuxPlatform {
pub kernel_version: String,
pub architecture: String,
}Expand description
Linux 平台信息
Fields§
§kernel_version: String内核版本
architecture: String架构
Implementations§
Source§impl LinuxPlatform
impl LinuxPlatform
Sourcepub fn supports_ebpf(&self) -> bool
pub fn supports_ebpf(&self) -> bool
检查是否支持 eBPF
eBPF 需要内核 4.4+
Sourcepub fn supports_af_xdp(&self) -> bool
pub fn supports_af_xdp(&self) -> bool
检查是否支持 AF_XDP
AF_XDP 需要内核 4.18+
Sourcepub fn supports_hugepage(&self) -> bool
pub fn supports_hugepage(&self) -> bool
检查是否支持 HugePage
Sourcepub fn supports_xdp_native(&self) -> bool
pub fn supports_xdp_native(&self) -> bool
检查是否支持 XDP Native 模式
需要内核 5.3+ 和网卡驱动支持
Sourcepub fn detect_capabilities(&self) -> PlatformCapabilities
pub fn detect_capabilities(&self) -> PlatformCapabilities
Trait Implementations§
Source§impl Clone for LinuxPlatform
impl Clone for LinuxPlatform
Source§fn clone(&self) -> LinuxPlatform
fn clone(&self) -> LinuxPlatform
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LinuxPlatform
impl RefUnwindSafe for LinuxPlatform
impl Send for LinuxPlatform
impl Sync for LinuxPlatform
impl Unpin for LinuxPlatform
impl UnsafeUnpin for LinuxPlatform
impl UnwindSafe for LinuxPlatform
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