pub enum Recovered<T> {
Adopted(Vec<T>),
Ephemeral,
}Expand description
The outcome of asking a backend what it is already running
(AgentRuntime::recover, ControlPlane::recover).
The two cases are kept apart because “nothing to adopt” and “this backend
cannot tell you” lead to opposite conclusions, and conflating them is exactly
how a restarted control plane comes to report an empty fleet while the agents
are still up. T is whatever the layer hands back — AgentIds from the
port, richer status from the service.
Variants§
Adopted(Vec<T>)
The backend outlives this process and these are the instances it holds (possibly none — that answer is trustworthy).
Ephemeral
The backend cannot outlive this process, so whatever it was managing is gone and nothing could be adopted. Not an error, and not “none”: an operator seeing this knows the fleet is unmanaged, not empty.
Implementations§
Trait Implementations§
impl<T: Eq> Eq for Recovered<T>
impl<T: PartialEq> StructuralPartialEq for Recovered<T>
Auto Trait Implementations§
impl<T> Freeze for Recovered<T>
impl<T> RefUnwindSafe for Recovered<T>where
Vec<T>: RefUnwindSafe,
impl<T> Send for Recovered<T>
impl<T> Sync for Recovered<T>
impl<T> Unpin for Recovered<T>
impl<T> UnsafeUnpin for Recovered<T>where
Vec<T>: UnsafeUnpin,
impl<T> UnwindSafe for Recovered<T>where
Vec<T>: UnwindSafe,
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.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