pub struct TeardownOpts {
pub delete_image: bool,
pub delete_log_group: bool,
pub delete_attempts: u32,
pub delete_backoff: Duration,
pub wait_for_terminated: Option<Duration>,
}Expand description
What a teardown should delete beyond the VM itself.
Both deletions are opt-in, because both destroy something a caller may still want: the image is reusable across runs, and the log group is where a failed build’s only evidence lives.
Fields§
§delete_image: boolWhether to delete the image the sandbox built.
delete_log_group: boolWhether the build log group should be deleted.
This crate cannot delete it — CloudWatch is not in the dependency set — so
asking names the group in TeardownReport::undeleted rather than removing it.
See that field for why naming is the honest answer rather than a silent success.
delete_attempts: u32How many times the image delete is retried.
delete_backoff: DurationThe gap between image-delete attempts.
wait_for_terminated: Option<Duration>How long to wait for TERMINATED, or None to return as soon as the terminate call
is accepted.
None by default, matching the Python client: the caller is on the way out, and a
teardown that blocked five minutes on a state nobody reads is five minutes of a CI
job. A caller that needs STATE-10 observed passes
TeardownOpts::waiting_for_terminated.
Implementations§
Source§impl TeardownOpts
impl TeardownOpts
Sourcepub fn deleting_image(self) -> TeardownOpts
pub fn deleting_image(self) -> TeardownOpts
Deletes the image as well as the VM.
Sourcepub fn deleting_log_group(self) -> TeardownOpts
pub fn deleting_log_group(self) -> TeardownOpts
Asks for the log group too, which names it rather than deleting it.
Sourcepub fn waiting_for_terminated(self) -> TeardownOpts
pub fn waiting_for_terminated(self) -> TeardownOpts
Waits for TERMINATED before returning (STATE-10).
Trait Implementations§
Source§impl Clone for TeardownOpts
impl Clone for TeardownOpts
Source§fn clone(&self) -> TeardownOpts
fn clone(&self) -> TeardownOpts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TeardownOpts
Source§impl Debug for TeardownOpts
impl Debug for TeardownOpts
Source§impl Default for TeardownOpts
impl Default for TeardownOpts
Source§fn default() -> TeardownOpts
fn default() -> TeardownOpts
Auto Trait Implementations§
impl Freeze for TeardownOpts
impl RefUnwindSafe for TeardownOpts
impl Send for TeardownOpts
impl Sync for TeardownOpts
impl Unpin for TeardownOpts
impl UnsafeUnpin for TeardownOpts
impl UnwindSafe for TeardownOpts
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