pub struct PluginSchema {
pub namespace: String,
pub version: String,
pub description: String,
pub long_description: 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)
hash: StringContent hash computed from methods + children hashes (for cache invalidation) This hash changes when any method or child plugin changes
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>,
) -> PluginSchema
pub fn leaf( namespace: impl Into<String>, version: impl Into<String>, description: impl Into<String>, methods: Vec<MethodSchema>, ) -> PluginSchema
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>,
) -> PluginSchema
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>, ) -> PluginSchema
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>,
) -> PluginSchema
pub fn hub( namespace: impl Into<String>, version: impl Into<String>, description: impl Into<String>, methods: Vec<MethodSchema>, children: Vec<ChildSummary>, ) -> PluginSchema
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>,
) -> PluginSchema
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>, ) -> PluginSchema
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<PluginSchema, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PluginSchema, <__D as Deserializer<'de>>::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 moreSource§impl Serialize for PluginSchema
impl Serialize for PluginSchema
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,
Auto Trait Implementations§
impl Freeze for PluginSchema
impl RefUnwindSafe for PluginSchema
impl Send for PluginSchema
impl Sync for PluginSchema
impl Unpin for PluginSchema
impl UnwindSafe for PluginSchema
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more