pub struct ObserverCapabilities { /* private fields */ }Expand description
The full capability matrix produced by ObserverCapabilities::negotiate.
Each EventCategory appears exactly once. Phase 1 reports
Lifecycle as
Supported and the rest as
Unavailable.
Implementations§
Source§impl ObserverCapabilities
impl ObserverCapabilities
Sourcepub fn negotiate() -> Self
pub fn negotiate() -> Self
Negotiate the capability matrix for the current platform.
Phase 1 reports Lifecycle as Supported (portable, OS-agnostic).
Phase 3 categories (File, Network, Process) currently report
Unavailable, but the backend name and reason are now per-OS via
#[cfg]-gated detection helpers (#430). This keeps the
ObserverCapabilities::negotiate() contract stable for Phase 4
downstream UX while letting Phase 3 light each backend up
independently — flipping Unavailable → Supported per backend lands
without touching this function’s shape.
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 category set so a UI can snapshot or diff it. Layout:
observer capabilities:
lifecycle supported portable-lifecycle started/exited emitted from the crate spawn and reap path
file unavailable none requires Phase 3 platform backend (seccomp/eBPF/ETW)
network unavailable none requires Phase 3 platform backend (seccomp/eBPF/ETW)
process unavailable none requires Phase 3 platform backend (seccomp/eBPF/ETW)Phase 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
Source§fn eq(&self, other: &ObserverCapabilities) -> bool
fn eq(&self, other: &ObserverCapabilities) -> bool
self and other values to be equal, and is used by ==.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