pub struct ProcessVisibilityScope {
pub own: Arc<RwLock<ProcessRegistry>>,
/* private fields */
}Expand description
Scoped view of process registries for parent-child visibility.
§Visibility rules
| Operation | Own processes | Child processes |
|---|---|---|
| list | yes | yes |
| stats | yes | yes (read-only) |
| wait | yes | yes |
| read output | yes | yes |
| kill | yes | no |
Fields§
§own: Arc<RwLock<ProcessRegistry>>This agent’s own process registry.
Implementations§
Source§impl ProcessVisibilityScope
impl ProcessVisibilityScope
Sourcepub fn new(registry: Arc<RwLock<ProcessRegistry>>) -> Self
pub fn new(registry: Arc<RwLock<ProcessRegistry>>) -> Self
Create a new scope backed by the given registry (no children initially).
Sourcepub async fn add_child_registry(
&self,
label: impl Into<String>,
registry: Arc<RwLock<ProcessRegistry>>,
)
pub async fn add_child_registry( &self, label: impl Into<String>, registry: Arc<RwLock<ProcessRegistry>>, )
Register a child agent’s registry as visible to this agent.
label is a display name (e.g., agent UUID or name) used to tag
child processes in listing output.
Sourcepub async fn visible_running(&self) -> Vec<(Option<String>, ProcessRecord)>
pub async fn visible_running(&self) -> Vec<(Option<String>, ProcessRecord)>
Collect all running processes visible to this agent.
Returns (agent_label, record) pairs. agent_label is None for
own processes and Some(label) for child-agent processes.
Trait Implementations§
Source§impl Clone for ProcessVisibilityScope
impl Clone for ProcessVisibilityScope
Source§fn clone(&self) -> ProcessVisibilityScope
fn clone(&self) -> ProcessVisibilityScope
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ProcessVisibilityScope
impl !RefUnwindSafe for ProcessVisibilityScope
impl Send for ProcessVisibilityScope
impl Sync for ProcessVisibilityScope
impl Unpin for ProcessVisibilityScope
impl UnsafeUnpin for ProcessVisibilityScope
impl !UnwindSafe for ProcessVisibilityScope
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<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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