pub struct ShutdownOptions { /* private fields */ }Expand description
Validated options for one runtime shutdown request.
Implementations§
Source§impl ShutdownOptions
impl ShutdownOptions
Sourcepub fn new(
total_timeout: Duration,
active_turn_policy: ActiveTurnPolicy,
) -> Result<Self, ShutdownOptionsError>
pub fn new( total_timeout: Duration, active_turn_policy: ActiveTurnPolicy, ) -> Result<Self, ShutdownOptionsError>
Validates a total timeout and active-turn policy before runtime access.
Sourcepub fn interrupt(total_timeout: Duration) -> Result<Self, ShutdownOptionsError>
pub fn interrupt(total_timeout: Duration) -> Result<Self, ShutdownOptionsError>
Creates an immediate-interrupt shutdown plan.
Sourcepub fn finish_current(
total_timeout: Duration,
grace: Duration,
) -> Result<Self, ShutdownOptionsError>
pub fn finish_current( total_timeout: Duration, grace: Duration, ) -> Result<Self, ShutdownOptionsError>
Creates a finish-current shutdown plan.
Sourcepub const fn total_timeout(&self) -> Duration
pub const fn total_timeout(&self) -> Duration
Returns the one total timeout used by all B-stage shutdown work.
Sourcepub const fn active_turn_policy(&self) -> ActiveTurnPolicy
pub const fn active_turn_policy(&self) -> ActiveTurnPolicy
Returns the selected active-turn policy.
Trait Implementations§
Source§impl Clone for ShutdownOptions
impl Clone for ShutdownOptions
Source§fn clone(&self) -> ShutdownOptions
fn clone(&self) -> ShutdownOptions
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 ShutdownOptions
Source§impl Debug for ShutdownOptions
impl Debug for ShutdownOptions
impl Eq for ShutdownOptions
Source§impl PartialEq for ShutdownOptions
impl PartialEq for ShutdownOptions
impl StructuralPartialEq for ShutdownOptions
Auto Trait Implementations§
impl Freeze for ShutdownOptions
impl RefUnwindSafe for ShutdownOptions
impl Send for ShutdownOptions
impl Sync for ShutdownOptions
impl Unpin for ShutdownOptions
impl UnsafeUnpin for ShutdownOptions
impl UnwindSafe for ShutdownOptions
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> 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.