pub struct NonBlockingOptions { /* private fields */ }Expand description
Configuration options for the non-blocking WebSocket client.
Implementations§
Source§impl NonBlockingOptions
impl NonBlockingOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new NonBlockingOptions with default values.
All options are set to their defaults. Use builder methods to configure.
Sourcepub fn spin_wait_duration(self, duration: Option<Duration>) -> S9Result<Self>
pub fn spin_wait_duration(self, duration: Option<Duration>) -> S9Result<Self>
Sets the sleep duration between event loop iterations.
None: Maximum performance, 100% CPU usage (busy spin loop)Some(duration): Sleeps between iterations, reduces CPU usage
Duration must be greater than zero if specified.
Trait Implementations§
Source§impl Clone for NonBlockingOptions
impl Clone for NonBlockingOptions
Source§impl Debug for NonBlockingOptions
impl Debug for NonBlockingOptions
Auto Trait Implementations§
impl Freeze for NonBlockingOptions
impl RefUnwindSafe for NonBlockingOptions
impl Send for NonBlockingOptions
impl Sync for NonBlockingOptions
impl Unpin for NonBlockingOptions
impl UnsafeUnpin for NonBlockingOptions
impl UnwindSafe for NonBlockingOptions
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