pub struct BackendConfig { /* private fields */ }Expand description
Configuration passed to every backend on creation.
Implementations§
Source§impl BackendConfig
impl BackendConfig
Sourcepub fn queue_depth(&self) -> usize
pub fn queue_depth(&self) -> usize
Maximum number of descriptors that can be registered with the backend.
Sourcepub fn event_batch_size(&self) -> usize
pub fn event_batch_size(&self) -> usize
Number of events a backend should attempt to process per poll call.
Sourcepub fn spin_before_park(&self) -> Duration
pub fn spin_before_park(&self) -> Duration
Duration the backend may spin prior to parking the thread.
Sourcepub fn default_timeout(&self) -> Option<Duration>
pub fn default_timeout(&self) -> Option<Duration>
Default timeout applied when callers pass None to Backend::poll.
Sourcepub fn with_queue_depth(self, queue_depth: usize) -> Self
pub fn with_queue_depth(self, queue_depth: usize) -> Self
Overrides the queue depth.
Sourcepub fn with_event_batch_size(self, batch: usize) -> Self
pub fn with_event_batch_size(self, batch: usize) -> Self
Overrides the event batch size.
Sourcepub fn with_spin_before_park(self, duration: Duration) -> Self
pub fn with_spin_before_park(self, duration: Duration) -> Self
Overrides the spin duration.
Sourcepub fn with_default_timeout(self, timeout: Option<Duration>) -> Self
pub fn with_default_timeout(self, timeout: Option<Duration>) -> Self
Overrides the default timeout value.
Trait Implementations§
Source§impl Clone for BackendConfig
impl Clone for BackendConfig
Source§fn clone(&self) -> BackendConfig
fn clone(&self) -> BackendConfig
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 BackendConfig
impl Debug for BackendConfig
Auto Trait Implementations§
impl Freeze for BackendConfig
impl RefUnwindSafe for BackendConfig
impl Send for BackendConfig
impl Sync for BackendConfig
impl Unpin for BackendConfig
impl UnwindSafe for BackendConfig
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