#[non_exhaustive]pub struct Adoption {
pub name: RunName,
pub state_from: PathBuf,
pub params: BTreeMap<String, String>,
pub host_label: Option<String>,
pub expires_at: Option<u64>,
pub started_at: Option<String>,
pub slot: Option<u8>,
}Expand description
An existing Terraform deployment to adopt as a run (Runner::adopt): where its local state
is, and what the runner can’t read from that state (the params it was applied with, where it
is, when it expires).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: RunNameThe run it becomes.
state_from: PathBufThe folder holding its Terraform state.
params: BTreeMap<String, String>The params it was applied with (the region, the account’s profile or project): only the
manifest’s params a caller sets (set_by: embedder) are kept.
host_label: Option<String>What the caller calls the place it is on (an account’s id), as an operation’s
host_label.
expires_at: Option<u64>When it stops itself, in seconds since the Unix epoch.
started_at: Option<String>When it was started (RFC 3339), when known (else the time it is taken over).
slot: Option<u8>Its slot on its place (${run.slot}), for a manifest that names one: the one it was
applied with. Unset, the place’s lowest free slot.
Implementations§
Source§impl Adoption
impl Adoption
Sourcepub fn new(name: RunName, state_from: impl Into<PathBuf>) -> Adoption
pub fn new(name: RunName, state_from: impl Into<PathBuf>) -> Adoption
The deployment whose state is in state_from, as run name: no param, place or expiry.
Sourcepub fn with_params(
self,
params: impl IntoIterator<Item = (String, String)>,
) -> Adoption
pub fn with_params( self, params: impl IntoIterator<Item = (String, String)>, ) -> Adoption
With the params it was applied with: a later operation replays them, a param left out taking its default, and one the manifest requires with none refused.
Sourcepub fn with_host_label(self, label: impl Into<String>) -> Adoption
pub fn with_host_label(self, label: impl Into<String>) -> Adoption
On the place the caller calls label (an operation’s host_label).
Sourcepub fn with_expires_at(self, unix_seconds: u64) -> Adoption
pub fn with_expires_at(self, unix_seconds: u64) -> Adoption
Stopping itself at unix_seconds.
Sourcepub fn with_started_at(self, rfc3339: impl Into<String>) -> Adoption
pub fn with_started_at(self, rfc3339: impl Into<String>) -> Adoption
Started at rfc3339.
Sourcepub fn with_slot(self, slot: u8) -> Adoption
pub fn with_slot(self, slot: u8) -> Adoption
Applied in slot slot of its place (${run.slot}, 1 to 99): the run keeps it, as its
resources are named after it; Runner::adopt refuses one out of range or another run on
the place holds. Without it, the run takes the lowest free one.
Trait Implementations§
impl Eq for Adoption
impl StructuralPartialEq for Adoption
Auto Trait Implementations§
impl Forget for Adoption
impl Freeze for Adoption
impl Move for Adoption
impl RefUnwindSafe for Adoption
impl Send for Adoption
impl Sync for Adoption
impl Unpin for Adoption
impl UnsafeUnpin for Adoption
impl UnwindSafe for Adoption
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<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
key and return true if they are equal.