#[non_exhaustive]pub struct Adoption {
pub name: RunName,
pub state_from: PathBuf,
pub host_label: Option<String>,
pub expires_at: Option<u64>,
pub started_at: Option<String>,
}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 (where it is, when it expires).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
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 may be removed, in seconds since the Unix epoch (what the reaper reads).
started_at: Option<String>When it was started (RFC 3339), when known (else the time it is taken over).
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 place or expiry.
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
Expiring 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 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
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.