pub struct AsyncLaunchConfig {
pub poll_strategy: PollStrategy,
pub timeout: Option<Duration>,
}Expand description
Configuration for async kernel launch behaviour.
Fields§
§poll_strategy: PollStrategyStrategy for polling event completion.
timeout: Option<Duration>Optional maximum time to wait before the future resolves with a timeout error.
Implementations§
Source§impl AsyncLaunchConfig
impl AsyncLaunchConfig
Sourcepub fn new(poll_strategy: PollStrategy) -> Self
pub fn new(poll_strategy: PollStrategy) -> Self
Creates a new config with the given poll strategy and no timeout.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Sets the timeout duration.
Trait Implementations§
Source§impl Clone for AsyncLaunchConfig
impl Clone for AsyncLaunchConfig
Source§fn clone(&self) -> AsyncLaunchConfig
fn clone(&self) -> AsyncLaunchConfig
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 AsyncLaunchConfig
impl Debug for AsyncLaunchConfig
Source§impl Default for AsyncLaunchConfig
impl Default for AsyncLaunchConfig
Source§fn default() -> Self
fn default() -> Self
Default config: PollStrategy::Yield, no timeout.
Auto Trait Implementations§
impl Freeze for AsyncLaunchConfig
impl RefUnwindSafe for AsyncLaunchConfig
impl Send for AsyncLaunchConfig
impl Sync for AsyncLaunchConfig
impl Unpin for AsyncLaunchConfig
impl UnsafeUnpin for AsyncLaunchConfig
impl UnwindSafe for AsyncLaunchConfig
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