pub struct MultiShotConfig {
pub max_completions: Option<u32>,
pub continue_on_error: bool,
pub buffer_group_id: Option<u16>,
}Expand description
Multi-shot operation configuration.
Multi-shot operations allow a single submission to generate multiple
completion events, reducing submission overhead for operations like
accept() that can be repeated.
Fields§
§max_completions: Option<u32>Maximum number of completions to generate
continue_on_error: boolWhether to continue on errors
buffer_group_id: Option<u16>Buffer group to use for multi-shot reads
Implementations§
Source§impl MultiShotConfig
impl MultiShotConfig
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new multi-shot configuration.
§Examples
use safer_ring::advanced::MultiShotConfig;
let config = MultiShotConfig::new()
.with_max_completions(100)
.with_buffer_group(1);Sourcepub fn with_max_completions(self, max: u32) -> Self
pub fn with_max_completions(self, max: u32) -> Self
Set the maximum number of completions.
Sourcepub fn with_continue_on_error(self) -> Self
pub fn with_continue_on_error(self) -> Self
Enable continuing on errors.
Sourcepub fn with_buffer_group(self, group_id: u16) -> Self
pub fn with_buffer_group(self, group_id: u16) -> Self
Set the buffer group ID for multi-shot reads.
Trait Implementations§
Source§impl Clone for MultiShotConfig
impl Clone for MultiShotConfig
Source§fn clone(&self) -> MultiShotConfig
fn clone(&self) -> MultiShotConfig
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 MultiShotConfig
impl Debug for MultiShotConfig
Source§impl Default for MultiShotConfig
impl Default for MultiShotConfig
Source§fn default() -> MultiShotConfig
fn default() -> MultiShotConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for MultiShotConfig
impl RefUnwindSafe for MultiShotConfig
impl Send for MultiShotConfig
impl Sync for MultiShotConfig
impl Unpin for MultiShotConfig
impl UnwindSafe for MultiShotConfig
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