#[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
A deployment the runner takes over (Runner::adopt).
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 the embedder sets are kept.
host_label: Option<String>What the embedder calls the place it is on (the account’s id).
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 (the launcher’s Proxmox labs had 1). 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.
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 embedder calls 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.
Trait Implementations§
impl Eq for Adoption
impl StructuralPartialEq for Adoption
Auto Trait Implementations§
impl Freeze 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.