pub struct PluginSchema {
pub namespace: String,
pub version: String,
pub description: String,
pub long_description: Option<String>,
pub self_hash: String,
pub children_hash: Option<String>,
pub hash: String,
pub methods: Vec<MethodSchema>,
pub children: Option<Vec<ChildSummary>>,
}Expand description
A plugin’s schema with methods and child summaries.
Children are represented as summaries (namespace, description, hash) rather
than full recursive schemas. This enables lazy traversal - clients can fetch
child schemas individually via {namespace}.schema.
- Leaf plugins have
children = None - Hub plugins have
children = Some([ChildSummary, ...])
Fields§
§namespace: StringThe plugin’s namespace (e.g., “echo”, “plexus”)
version: StringThe plugin’s version (e.g., “1.0.0”)
description: StringShort description of the plugin (max 15 words)
long_description: Option<String>Detailed description of the plugin (optional)
self_hash: StringHash of ONLY this plugin’s methods (ignores children) Changes when method signatures, names, or descriptions change
children_hash: Option<String>Hash of ONLY child plugin hashes (None for leaf plugins) Changes when any child’s hash changes (recursively)
hash: StringComposite hash = hash(self_hash + children_hash) Use this if you want a single hash for the entire subtree Backward compatible with previous single-hash system
methods: Vec<MethodSchema>Methods exposed by this plugin
children: Option<Vec<ChildSummary>>Child plugin summaries (None = leaf plugin, Some = hub plugin)
Implementations§
Source§impl PluginSchema
impl PluginSchema
Sourcepub fn leaf(
namespace: impl Into<String>,
version: impl Into<String>,
description: impl Into<String>,
methods: Vec<MethodSchema>,
) -> Self
pub fn leaf( namespace: impl Into<String>, version: impl Into<String>, description: impl Into<String>, methods: Vec<MethodSchema>, ) -> Self
Create a new leaf plugin schema (no children)
Sourcepub fn leaf_with_long_description(
namespace: impl Into<String>,
version: impl Into<String>,
description: impl Into<String>,
long_description: impl Into<String>,
methods: Vec<MethodSchema>,
) -> Self
pub fn leaf_with_long_description( namespace: impl Into<String>, version: impl Into<String>, description: impl Into<String>, long_description: impl Into<String>, methods: Vec<MethodSchema>, ) -> Self
Create a new leaf plugin schema with long description
Sourcepub fn hub(
namespace: impl Into<String>,
version: impl Into<String>,
description: impl Into<String>,
methods: Vec<MethodSchema>,
children: Vec<ChildSummary>,
) -> Self
pub fn hub( namespace: impl Into<String>, version: impl Into<String>, description: impl Into<String>, methods: Vec<MethodSchema>, children: Vec<ChildSummary>, ) -> Self
Create a new hub plugin schema (with child summaries)
Sourcepub fn hub_with_long_description(
namespace: impl Into<String>,
version: impl Into<String>,
description: impl Into<String>,
long_description: impl Into<String>,
methods: Vec<MethodSchema>,
children: Vec<ChildSummary>,
) -> Self
pub fn hub_with_long_description( namespace: impl Into<String>, version: impl Into<String>, description: impl Into<String>, long_description: impl Into<String>, methods: Vec<MethodSchema>, children: Vec<ChildSummary>, ) -> Self
Create a new hub plugin schema with long description
Trait Implementations§
Source§impl Clone for PluginSchema
impl Clone for PluginSchema
Source§fn clone(&self) -> PluginSchema
fn clone(&self) -> PluginSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PluginSchema
impl Debug for PluginSchema
Source§impl<'de> Deserialize<'de> for PluginSchema
impl<'de> Deserialize<'de> for PluginSchema
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>,
Source§impl JsonSchema for PluginSchema
impl JsonSchema for PluginSchema
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more