pub struct WaitOpts {
pub timeout: Duration,
pub poll_interval: Duration,
pub stall_grace: Duration,
}Expand description
How long to wait and how often to poll.
Fields§
§timeout: DurationThe client-side deadline.
poll_interval: DurationThe gap between polls.
stall_grace: DurationHow long CREATING is tolerated before the stall probe runs (TRAP-2).
Only meaningful for the image wait; the launch wait has no equivalent, because a launch has no build list to probe.
Implementations§
Source§impl WaitOpts
impl WaitOpts
Sourcepub fn for_launch() -> WaitOpts
pub fn for_launch() -> WaitOpts
Options for the launch wait: crate::sandbox::DEFAULT_LIFECYCLE_TIMEOUT at
crate::sandbox::LIFECYCLE_POLL_INTERVAL, five minutes at five-second polls.
Sourcepub fn for_lifecycle(timeout: Duration) -> WaitOpts
pub fn for_lifecycle(timeout: Duration) -> WaitOpts
Options for a lifecycle wait (a launch, suspend, resume or terminate) with the caller’s
deadline: core’s crate::sandbox::LIFECYCLE_POLL_INTERVAL, and no stall probe.
Every surface’s lifecycle wait starts here, so what a lifecycle wait is lives in one
place (#266); a caller that polls at another rate sets poll_interval on the result.
stall_grace is set past any deadline rather than to zero, since a zero grace would
read as “probe immediately”, and a lifecycle transition has no build list to probe
(TRAP-2 is the image build’s).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WaitOpts
impl RefUnwindSafe for WaitOpts
impl Send for WaitOpts
impl Sync for WaitOpts
impl Unpin for WaitOpts
impl UnsafeUnpin for WaitOpts
impl UnwindSafe for WaitOpts
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more