pub struct RunHookTimeout(/* private fields */);Expand description
A timeout for the run, resume, suspend, or terminate hook: 1..=60 seconds.
See the module docs for why this cannot be built from a BuildHookTimeout.
Implementations§
Source§impl RunHookTimeout
impl RunHookTimeout
Sourcepub const MAX_SECS: u32 = MAX_MICROVM_HOOK_TIMEOUT_SEC
pub const MAX_SECS: u32 = MAX_MICROVM_HOOK_TIMEOUT_SEC
The service ceiling for the MicroVM hook family.
Sourcepub fn try_new(secs: u32) -> Result<RunHookTimeout, Error>
pub fn try_new(secs: u32) -> Result<RunHookTimeout, Error>
A run-family timeout, or a local reject naming both ceilings.
The error names the other family’s ceiling too, because the caller who hits this is nearly always someone who picked a build-hook number: telling them 60 is the limit answers a question they did not ask, and telling them the two families differ by 60x answers the one they did.
Trait Implementations§
Source§impl Clone for RunHookTimeout
impl Clone for RunHookTimeout
Source§fn clone(&self) -> RunHookTimeout
fn clone(&self) -> RunHookTimeout
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 moreimpl Copy for RunHookTimeout
Source§impl Debug for RunHookTimeout
impl Debug for RunHookTimeout
Source§impl Display for RunHookTimeout
impl Display for RunHookTimeout
impl Eq for RunHookTimeout
Source§impl Hash for RunHookTimeout
impl Hash for RunHookTimeout
Source§impl Ord for RunHookTimeout
impl Ord for RunHookTimeout
Source§fn cmp(&self, other: &RunHookTimeout) -> Ordering
fn cmp(&self, other: &RunHookTimeout) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for RunHookTimeout
impl PartialEq for RunHookTimeout
Source§impl PartialOrd for RunHookTimeout
impl PartialOrd for RunHookTimeout
impl StructuralPartialEq for RunHookTimeout
Auto Trait Implementations§
impl Freeze for RunHookTimeout
impl RefUnwindSafe for RunHookTimeout
impl Send for RunHookTimeout
impl Sync for RunHookTimeout
impl Unpin for RunHookTimeout
impl UnsafeUnpin for RunHookTimeout
impl UnwindSafe for RunHookTimeout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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> ⓘ
Converts
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> ⓘ
Converts
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 moreCreates a shared type from an unshared type.