pub struct SourceRuntimeOpts {
pub deadline: Option<Instant>,
pub cancelled: bool,
}Expand description
Optional wall-clock / cancel bounds for run_source_runtime.
Driver SourceDriver::stop_reason is also honored each iteration.
Fields§
§deadline: Option<Instant>Stop with StopReason::Deadline once Instant::now() >= deadline.
cancelled: boolWhen true, stop with StopReason::Cancelled at the next check.
Implementations§
Source§impl SourceRuntimeOpts
impl SourceRuntimeOpts
Sourcepub fn with_deadline(self, deadline: Instant) -> Self
pub fn with_deadline(self, deadline: Instant) -> Self
Builder: wall-clock deadline.
Sourcepub fn with_cancelled(self, cancelled: bool) -> Self
pub fn with_cancelled(self, cancelled: bool) -> Self
Builder: mark cancelled.
Trait Implementations§
Source§impl Clone for SourceRuntimeOpts
impl Clone for SourceRuntimeOpts
Source§fn clone(&self) -> SourceRuntimeOpts
fn clone(&self) -> SourceRuntimeOpts
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SourceRuntimeOpts
impl Debug for SourceRuntimeOpts
Source§impl Default for SourceRuntimeOpts
impl Default for SourceRuntimeOpts
Source§fn default() -> SourceRuntimeOpts
fn default() -> SourceRuntimeOpts
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SourceRuntimeOpts
impl RefUnwindSafe for SourceRuntimeOpts
impl Send for SourceRuntimeOpts
impl Sync for SourceRuntimeOpts
impl Unpin for SourceRuntimeOpts
impl UnsafeUnpin for SourceRuntimeOpts
impl UnwindSafe for SourceRuntimeOpts
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