pub struct InterventionCapabilities {
pub supported: Vec<InterventionPrimitive>,
}Expand description
The set of neutral intervention primitives a harness advertises support for.
The server and ops console gate on THIS, never on harness identity. An empty set is a first-class, valid advertisement — an observability-only harness supports no interventions, and the console offers no controls for it. It is a legitimate tier, not a degenerate one.
Modelled as an explicit list of supported InterventionPrimitives. Duplicates are ignored
by the accessors; ordering is not significant.
Fields§
§supported: Vec<InterventionPrimitive>The primitives this harness supports. Empty = observability-only.
Implementations§
Source§impl InterventionCapabilities
impl InterventionCapabilities
Sourcepub fn none() -> Self
pub fn none() -> Self
The empty capability set — an observability-only harness that supports no interventions.
This is a first-class, valid advertisement (not an error): the ops console offers no controls for a harness advertising it.
Sourcepub fn from_primitives(
primitives: impl IntoIterator<Item = InterventionPrimitive>,
) -> Self
pub fn from_primitives( primitives: impl IntoIterator<Item = InterventionPrimitive>, ) -> Self
Builds a capability set from an iterator of supported primitives.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true when no intervention primitive is supported (observability-only).
Sourcepub fn supports_primitive(&self, primitive: InterventionPrimitive) -> bool
pub fn supports_primitive(&self, primitive: InterventionPrimitive) -> bool
Returns true when the given primitive is advertised as supported.
Sourcepub fn supports(&self, kind: &InterventionKind) -> bool
pub fn supports(&self, kind: &InterventionKind) -> bool
Returns true when the given command’s primitive is advertised as supported.
The server uses this to refuse an unadvertised primitive before it is ever routed.
Trait Implementations§
Source§impl Clone for InterventionCapabilities
impl Clone for InterventionCapabilities
Source§fn clone(&self) -> InterventionCapabilities
fn clone(&self) -> InterventionCapabilities
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 InterventionCapabilities
impl Debug for InterventionCapabilities
Source§impl Default for InterventionCapabilities
impl Default for InterventionCapabilities
Source§fn default() -> InterventionCapabilities
fn default() -> InterventionCapabilities
Source§impl<'de> Deserialize<'de> for InterventionCapabilities
impl<'de> Deserialize<'de> for InterventionCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for InterventionCapabilities
Source§impl PartialEq for InterventionCapabilities
impl PartialEq for InterventionCapabilities
Source§impl Serialize for InterventionCapabilities
impl Serialize for InterventionCapabilities
impl StructuralPartialEq for InterventionCapabilities
Source§impl TS for InterventionCapabilities
impl TS for InterventionCapabilities
Source§type WithoutGenerics = InterventionCapabilities
type WithoutGenerics = InterventionCapabilities
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = InterventionCapabilities
type OptionInnerType = InterventionCapabilities
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more