pub struct ObserverCapabilities { /* private fields */ }Expand description
The full capability matrix produced by ObserverCapabilities::negotiate
or ObserverCapabilities::negotiate_for_scope.
Each EventCategory appears exactly once for the negotiated
TraceScope. Phase 1 reports Lifecycle as
Supported in every scope (the spawn/reap
path is scope-independent); the rest start out as
Unavailable and flip to
Supported/Partial as per-OS backends land (#539 for
LaunchedProcessTree, #469 for
SystemWide).
Implementations§
Source§impl ObserverCapabilities
impl ObserverCapabilities
Sourcepub fn negotiate() -> Self
pub fn negotiate() -> Self
Negotiate the capability matrix for the current platform under the
historical default scope (TraceScope::SystemWide).
Preserved for backwards compatibility with pre-#539 callers. New
callers that know which tier they want should use
negotiate_for_scope — the
LaunchedProcessTree scope advertises different per-OS backends
(no-admin: NT handle snapshot, /proc/<pid>/fd/*, proc_pidinfo)
than the SystemWide scope (admin-gated: ETW, eBPF, EndpointSecurity).
Sourcepub fn negotiate_for_scope(scope: TraceScope) -> Self
pub fn negotiate_for_scope(scope: TraceScope) -> Self
Negotiate the capability matrix for the current platform at the
requested TraceScope.
Lifecycle is Supported in every scope (the spawn/reap path is
scope-independent and runs in-process with no admin requirement).
File/Network/Process start out Unavailable and flip to
Supported/Partial as per-OS backends land — the scope × OS
dispatch lives in the crate-private detect_*_backend helpers.
Sourcepub fn scope(&self) -> TraceScope
pub fn scope(&self) -> TraceScope
The TraceScope this matrix was negotiated for.
Sourcepub fn categories(&self) -> &[CategoryCapability]
pub fn categories(&self) -> &[CategoryCapability]
Return the capability entries in stable EventCategory::ALL order.
Sourcepub fn category(&self, category: EventCategory) -> &CategoryCapability
pub fn category(&self, category: EventCategory) -> &CategoryCapability
Look up the capability entry for one category.
Sourcepub fn support(&self, category: EventCategory) -> CapabilitySupport
pub fn support(&self, category: EventCategory) -> CapabilitySupport
Return the negotiated support level for one category.
Sourcepub fn is_supported(&self, category: EventCategory) -> bool
pub fn is_supported(&self, category: EventCategory) -> bool
Return whether a category is fully Supported.
Sourcepub fn to_table_rows(&self) -> Vec<[String; 4]>
pub fn to_table_rows(&self) -> Vec<[String; 4]>
Return the capability matrix as four fixed-width rows suitable for downstream UX (e.g. a clud CLI flag — see Phase 4 of #221 / #431).
Each row is [category, support, backend, reason]. Row order matches
EventCategory::ALL, so consumers can rely on a stable layout. The
strings are owned so callers can paint colors / pad columns without
borrowing from self.
Sourcepub fn render_summary(&self) -> String
pub fn render_summary(&self) -> String
Render the capability matrix as a single human-readable string.
The output is deterministic per scope+category set so a UI can
snapshot or diff it. The first line names the negotiated
TraceScope so a diff between scopes is obvious. Layout:
observer capabilities (scope=system-wide):
lifecycle supported portable-lifecycle started/exited emitted from the crate spawn and reap path
file unavailable etw Phase 3: Windows ETW file backend not yet implemented
network unavailable etw Phase 3: Windows ETW network backend not yet implemented
process unavailable etw Phase 3: Windows ETW process backend not yet implementedPhase 4 (#431) consumers like the clud CLI use this to show the actually negotiated matrix rather than claiming syscall coverage the active backends do not provide.
Trait Implementations§
Source§impl Clone for ObserverCapabilities
impl Clone for ObserverCapabilities
Source§fn clone(&self) -> ObserverCapabilities
fn clone(&self) -> ObserverCapabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ObserverCapabilities
impl Debug for ObserverCapabilities
impl Eq for ObserverCapabilities
Source§impl PartialEq for ObserverCapabilities
impl PartialEq for ObserverCapabilities
impl StructuralPartialEq for ObserverCapabilities
Auto Trait Implementations§
impl Freeze for ObserverCapabilities
impl RefUnwindSafe for ObserverCapabilities
impl Send for ObserverCapabilities
impl Sync for ObserverCapabilities
impl Unpin for ObserverCapabilities
impl UnsafeUnpin for ObserverCapabilities
impl UnwindSafe for ObserverCapabilities
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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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> 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