Skip to main content

CapabilitySet

Trait CapabilitySet 

Source
pub trait CapabilitySet:
    Clone
    + Debug
    + Send
    + Sync {
    // Required methods
    fn capability_names(&self) -> Vec<&str>;
    fn count(&self) -> usize;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Trait for capability sets carried by Cx.

Each FrankenSuite project defines its own capability types and implements this trait. The trait provides introspection for logging and diagnostics.

Implementations must be Clone + Send + Sync to allow context propagation across async task boundaries.

Required Methods§

Source

fn capability_names(&self) -> Vec<&str>

Human-readable names of the capabilities in this set.

Source

fn count(&self) -> usize

Number of distinct capabilities.

Provided Methods§

Source

fn is_empty(&self) -> bool

Whether the capability set is empty.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§