pub struct ShellSessionRegistry {
shells: Mutex<HashMap<String, Sender<()>>>,
}Expand description
Per-shell stop handles. ShellStop (MCP tool / UI button) looks up a
shell_id and fires the oneshot, which makes the owning ShellNodeRunner
tree-kill its child. Mirrors InstallSessionRegistry; lives in
AppState.shell_sessions. Phase 3 of SPEC_PERSISTENT_SHELL_NODE.
Fields§
§shells: Mutex<HashMap<String, Sender<()>>>Implementations§
Source§impl ShellSessionRegistry
impl ShellSessionRegistry
pub fn new() -> Arc<Self>
fn insert(&self, shell_id: String, tx: Sender<()>)
Sourcepub fn stop(&self, shell_id: &str) -> bool
pub fn stop(&self, shell_id: &str) -> bool
Request stop of a running shell. Returns false if the id is unknown
(never started, or already exited). Removing here also closes the
window for the runner’s own natural-exit remove.
Trait Implementations§
Source§impl Default for ShellSessionRegistry
impl Default for ShellSessionRegistry
Source§fn default() -> ShellSessionRegistry
fn default() -> ShellSessionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ShellSessionRegistry
impl !RefUnwindSafe for ShellSessionRegistry
impl Send for ShellSessionRegistry
impl Sync for ShellSessionRegistry
impl Unpin for ShellSessionRegistry
impl !UnwindSafe for ShellSessionRegistry
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
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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