pub enum CapabilitiesV2 {
Structured {
required: Vec<Capability>,
optional: Vec<Capability>,
feature_flags: FeatureFlags,
},
Legacy(LegacyCapabilities),
}Expand description
V2 structured capability declaration with required/optional separation.
Variants§
Structured
V2 structured format: { required: [...], optional: [...], feature_flags: {...} }
Legacy(LegacyCapabilities)
V1 legacy flat format: { streaming: true, tools: true, vision: false }
Implementations§
Source§impl CapabilitiesV2
impl CapabilitiesV2
Sourcepub fn all_capabilities(&self) -> Vec<Capability>
pub fn all_capabilities(&self) -> Vec<Capability>
Get all capabilities (required + optional) as a unified set.
Sourcepub fn required_capabilities(&self) -> Vec<Capability>
pub fn required_capabilities(&self) -> Vec<Capability>
Get only the required capabilities.
Sourcepub fn has_capability(&self, cap: Capability) -> bool
pub fn has_capability(&self, cap: Capability) -> bool
Check if a specific capability is declared (required or optional).
Sourcepub fn feature_flags(&self) -> FeatureFlags
pub fn feature_flags(&self) -> FeatureFlags
Get the feature flags.
Sourcepub fn promote_to_v2(&self) -> CapabilitiesV2
pub fn promote_to_v2(&self) -> CapabilitiesV2
Auto-promote V1 legacy capabilities to V2 structured format.
Trait Implementations§
Source§impl Clone for CapabilitiesV2
impl Clone for CapabilitiesV2
Source§fn clone(&self) -> CapabilitiesV2
fn clone(&self) -> CapabilitiesV2
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 moreSource§impl Debug for CapabilitiesV2
impl Debug for CapabilitiesV2
Source§impl<'de> Deserialize<'de> for CapabilitiesV2
impl<'de> Deserialize<'de> for CapabilitiesV2
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CapabilitiesV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CapabilitiesV2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CapabilitiesV2
impl Serialize for CapabilitiesV2
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CapabilitiesV2
impl RefUnwindSafe for CapabilitiesV2
impl Send for CapabilitiesV2
impl Sync for CapabilitiesV2
impl Unpin for CapabilitiesV2
impl UnsafeUnpin for CapabilitiesV2
impl UnwindSafe for CapabilitiesV2
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