pub struct Policy {
pub cli: CliStop,
pub release_claims: bool,
pub stop_shell_sessions: bool,
pub stop_background: bool,
pub stop_container: bool,
}Expand description
What one teardown covers (spec §5). A consumer picks a constructor; it never adds its own kill code.
Fields§
§cli: CliStop§release_claims: boolRelease the agent’s work-queue claims (R7) and report the crons that target it (R8, kept).
stop_shell_sessions: boolStop the srv-spawned Shell() sessions it started (R3).
stop_background: boolStop its declared run_in_background tasks (R2) explicitly. A
graceful close takes them anyway with the tracker; this is for Stop,
which keeps the tracker (spec §5, §7.4).
stop_container: boolStop a container agent’s container (R6), which also drops its
dev-proxy routes. Stopped, not removed: the next launch restarts it
(ContainerManager::ensure_running), and its volume keeps its state.
Implementations§
Source§impl Policy
impl Policy
Sourcepub const fn close() -> Self
pub const fn close() -> Self
A pane, tab, window-tab or window closing: the agent and everything
it runs, Shell() sessions included; claims stay until their lease
expires, as before (spec §5).
Sourcepub const fn stop(graceful: bool, stop_background: bool) -> Self
pub const fn stop(graceful: bool, stop_background: bool) -> Self
Stop (agent.stop, FleetBulkStop): the CLI, and its background
tasks only if asked; its claims go back to the pool (spec §5). The
block, its Shell() sessions and drawers stay.
Sourcepub const fn stop_cli_only(graceful: bool) -> Self
pub const fn stop_cli_only(graceful: bool) -> Self
The watchdog’s max-runtime / idle stop: the CLI only, as it always has been. Its claims stay, since it may be restarted on the next message.
Trait Implementations§
impl Copy for Policy
impl Eq for Policy
impl StructuralPartialEq for Policy
Auto Trait Implementations§
impl Freeze for Policy
impl RefUnwindSafe for Policy
impl Send for Policy
impl Sync for Policy
impl Unpin for Policy
impl UnsafeUnpin for Policy
impl UnwindSafe for Policy
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,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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