pub struct KernelConfig {
pub mtu: u32,
pub loopback_mtu: u32,
pub send_buf_cap: usize,
pub recv_buf_cap: usize,
pub default_backlog: usize,
pub retx_threshold: u32,
pub retx_max: u32,
}Expand description
Tunable limits for a host’s network stack (MTU, buffer caps,
backlog, retransmit thresholds). Constructed via Self::default
and adjusted with the builder-style setters. Pass to
Net::with_config to apply to every
host added afterwards.
Fields§
§mtu: u32§loopback_mtu: u32§send_buf_cap: usize§recv_buf_cap: usize§default_backlog: usize§retx_threshold: u32§retx_max: u32Implementations§
Source§impl KernelConfig
impl KernelConfig
pub fn mtu(self, v: u32) -> Self
pub fn loopback_mtu(self, v: u32) -> Self
pub fn send_buf_cap(self, v: usize) -> Self
pub fn recv_buf_cap(self, v: usize) -> Self
pub fn default_backlog(self, v: usize) -> Self
pub fn retx_threshold(self, v: u32) -> Self
pub fn retx_max(self, v: u32) -> Self
Trait Implementations§
Source§impl Clone for KernelConfig
impl Clone for KernelConfig
Source§fn clone(&self) -> KernelConfig
fn clone(&self) -> KernelConfig
Returns a duplicate 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 KernelConfig
impl Debug for KernelConfig
Auto Trait Implementations§
impl Freeze for KernelConfig
impl RefUnwindSafe for KernelConfig
impl Send for KernelConfig
impl Sync for KernelConfig
impl Unpin for KernelConfig
impl UnsafeUnpin for KernelConfig
impl UnwindSafe for KernelConfig
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