pub struct CallableDescriptor {
pub name: String,
pub description: Option<String>,
pub callable_type: CallableType,
pub input_schema: Option<Value>,
pub output_schema: Option<Value>,
pub tags: Vec<String>,
pub can_spawn_children: bool,
pub cost_tier: CostTier,
pub avg_latency_ms: Option<u64>,
}Expand description
CallableDescriptor - Describes a callable for discovery @see packages/enact-schemas/src/execution.schemas.ts - callableDescriptorSchema
Fields§
§name: StringCallable name (unique identifier)
description: Option<String>Human-readable description
callable_type: CallableTypeCallable type
input_schema: Option<Value>Input schema (JSON Schema)
output_schema: Option<Value>Output schema (JSON Schema)
Tags for categorization
can_spawn_children: boolWhether this callable can spawn children
cost_tier: CostTierEstimated cost tier
avg_latency_ms: Option<u64>Average latency in milliseconds
Implementations§
Source§impl CallableDescriptor
impl CallableDescriptor
Sourcepub fn from_callable(
callable: &dyn Callable,
callable_type: CallableType,
) -> Self
pub fn from_callable( callable: &dyn Callable, callable_type: CallableType, ) -> Self
Create a new descriptor from a callable
Add tags
Sourcepub fn with_cost_tier(self, tier: CostTier) -> Self
pub fn with_cost_tier(self, tier: CostTier) -> Self
Set cost tier
Sourcepub fn with_spawn_capability(self, can_spawn: bool) -> Self
pub fn with_spawn_capability(self, can_spawn: bool) -> Self
Set can spawn children
Trait Implementations§
Source§impl Clone for CallableDescriptor
impl Clone for CallableDescriptor
Source§fn clone(&self) -> CallableDescriptor
fn clone(&self) -> CallableDescriptor
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 CallableDescriptor
impl Debug for CallableDescriptor
Source§impl<'de> Deserialize<'de> for CallableDescriptor
impl<'de> Deserialize<'de> for CallableDescriptor
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CallableDescriptor
impl RefUnwindSafe for CallableDescriptor
impl Send for CallableDescriptor
impl Sync for CallableDescriptor
impl Unpin for CallableDescriptor
impl UnsafeUnpin for CallableDescriptor
impl UnwindSafe for CallableDescriptor
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