pub struct SkillDefinition {
pub id: SkillId,
pub name: String,
pub description: String,
pub category: String,
pub tags: Vec<String>,
pub prompt: String,
pub tool_refs: Vec<String>,
pub workflow_refs: Vec<String>,
pub visibility: SkillVisibility,
pub version: String,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}Expand description
Complete definition of a skill
Fields§
§id: SkillIdUnique identifier (kebab-case)
name: StringDisplay name
description: StringHuman-readable description
category: StringCategory for grouping
Searchable tags
prompt: StringPrompt fragment injected into system prompt
tool_refs: Vec<String>Built-in tool references (format: “tool”)
workflow_refs: Vec<String>Associated workflow names
visibility: SkillVisibilityVisibility level
version: StringSemantic version
created_at: DateTime<Utc>Creation timestamp
updated_at: DateTime<Utc>Last update timestamp
Implementations§
Source§impl SkillDefinition
impl SkillDefinition
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
description: impl Into<String>,
category: impl Into<String>,
prompt: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, description: impl Into<String>, category: impl Into<String>, prompt: impl Into<String>, ) -> Self
Create a new skill definition with generated timestamp
Sourcepub fn with_tool_ref(self, tool_ref: impl Into<String>) -> Self
pub fn with_tool_ref(self, tool_ref: impl Into<String>) -> Self
Add a tool reference
Sourcepub fn with_workflow_ref(self, workflow_ref: impl Into<String>) -> Self
pub fn with_workflow_ref(self, workflow_ref: impl Into<String>) -> Self
Add a workflow reference
Sourcepub fn with_visibility(self, visibility: SkillVisibility) -> Self
pub fn with_visibility(self, visibility: SkillVisibility) -> Self
Set visibility
Sourcepub fn is_builtin(&self) -> bool
pub fn is_builtin(&self) -> bool
Check if this is a built-in skill (based on id prefix or version)
Trait Implementations§
Source§impl Clone for SkillDefinition
impl Clone for SkillDefinition
Source§fn clone(&self) -> SkillDefinition
fn clone(&self) -> SkillDefinition
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 SkillDefinition
impl Debug for SkillDefinition
Source§impl<'de> Deserialize<'de> for SkillDefinition
impl<'de> Deserialize<'de> for SkillDefinition
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 SkillDefinition
impl RefUnwindSafe for SkillDefinition
impl Send for SkillDefinition
impl Sync for SkillDefinition
impl Unpin for SkillDefinition
impl UnsafeUnpin for SkillDefinition
impl UnwindSafe for SkillDefinition
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