Struct xsk_rs::config::SocketConfigBuilder
source · [−]pub struct SocketConfigBuilder { /* private fields */ }
Expand description
Builder for a SocketConfig
.
Implementations
sourceimpl ConfigBuilder
impl ConfigBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new SocketConfigBuilder
instance
with no flags set and with queue sizes as per the libbpf
defaults.
sourcepub fn rx_queue_size(&mut self, size: QueueSize) -> &mut Self
pub fn rx_queue_size(&mut self, size: QueueSize) -> &mut Self
Set the RxQueue
size. Default is
XSK_RING_CONS__DEFAULT_NUM_DESCS
.
sourcepub fn tx_queue_size(&mut self, size: QueueSize) -> &mut Self
pub fn tx_queue_size(&mut self, size: QueueSize) -> &mut Self
Set the TxQueue
size. Default is
XSK_RING_PROD__DEFAULT_NUM_DESCS
.
sourcepub fn libbpf_flags(&mut self, flags: LibbpfFlags) -> &mut Self
pub fn libbpf_flags(&mut self, flags: LibbpfFlags) -> &mut Self
Set the LibbpfFlags
. Default is no flags set.
sourcepub fn xdp_flags(&mut self, flags: XdpFlags) -> &mut Self
pub fn xdp_flags(&mut self, flags: XdpFlags) -> &mut Self
Set the XdpFlags
. Default is no flags set.
sourcepub fn bind_flags(&mut self, flags: BindFlags) -> &mut Self
pub fn bind_flags(&mut self, flags: BindFlags) -> &mut Self
Set the socket BindFlags
. Default is no flags set.
sourcepub fn build(&self) -> Config
pub fn build(&self) -> Config
Build a SocketConfig
instance using the values set
in this builder.
Trait Implementations
sourceimpl Clone for ConfigBuilder
impl Clone for ConfigBuilder
sourcefn clone(&self) -> ConfigBuilder
fn clone(&self) -> ConfigBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ConfigBuilder
impl Debug for ConfigBuilder
sourceimpl Default for ConfigBuilder
impl Default for ConfigBuilder
sourcefn default() -> ConfigBuilder
fn default() -> ConfigBuilder
Returns the “default value” for a type. Read more
impl Copy for ConfigBuilder
Auto Trait Implementations
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more