Struct tun_rs::platform::linux::PlatformConfig
source · pub struct PlatformConfig { /* private fields */ }
Expand description
Linux-only interface configuration.
Implementations§
source§impl PlatformConfig
impl PlatformConfig
sourcepub fn packet_information(&mut self, value: bool) -> &mut Self
pub fn packet_information(&mut self, value: bool) -> &mut Self
Enable or disable packet information, the first 4 bytes of each packet delivered from/to Linux underlying API is a header with flags and protocol type when enabled.
Trait Implementations§
source§impl Clone for PlatformConfig
impl Clone for PlatformConfig
source§fn clone(&self) -> PlatformConfig
fn clone(&self) -> PlatformConfig
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 PlatformConfig
impl Debug for PlatformConfig
source§impl Default for PlatformConfig
impl Default for PlatformConfig
packet_information
is default to be false
and ensure_root_privileges
is default to be true
.
impl Copy for PlatformConfig
Auto Trait Implementations§
impl Freeze for PlatformConfig
impl RefUnwindSafe for PlatformConfig
impl Send for PlatformConfig
impl Sync for PlatformConfig
impl Unpin for PlatformConfig
impl UnwindSafe for PlatformConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)