pub struct McpNativeCard {
pub subject: Symbol,
pub description: String,
pub input_shape: Option<ShapeRef>,
pub output_shape: Option<ShapeRef>,
pub capabilities: Vec<CapabilityName>,
pub facets: Vec<NativeFacet>,
}Expand description
Native browse card describing one runtime subject and its MCP facets.
Fields§
§subject: SymbolRuntime symbol the card describes.
description: StringHuman-readable description.
input_shape: Option<ShapeRef>Default input shape applied to exported facets.
output_shape: Option<ShapeRef>Default output shape applied to exported facets.
capabilities: Vec<CapabilityName>Capabilities required to invoke the subject.
facets: Vec<NativeFacet>Facets attached to the card, including MCP exports.
Implementations§
Source§impl McpNativeCard
impl McpNativeCard
Sourcepub fn new(subject: Symbol, description: impl Into<String>) -> Self
pub fn new(subject: Symbol, description: impl Into<String>) -> Self
Creates a card for subject with the given description.
Sourcepub fn with_shapes(self, input: ShapeRef, output: ShapeRef) -> Self
pub fn with_shapes(self, input: ShapeRef, output: ShapeRef) -> Self
Returns the card with default input and output shapes set.
Sourcepub fn with_capability(self, capability: CapabilityName) -> Self
pub fn with_capability(self, capability: CapabilityName) -> Self
Returns the card with capability added to its requirements.
Sourcepub fn with_facet(self, facet: NativeFacet) -> Self
pub fn with_facet(self, facet: NativeFacet) -> Self
Returns the card with facet appended.
Sourcepub fn exported(self, export: McpExportFacet) -> Self
pub fn exported(self, export: McpExportFacet) -> Self
Returns the card with export appended as an MCP export facet.
Trait Implementations§
Source§impl Clone for McpNativeCard
impl Clone for McpNativeCard
Source§fn clone(&self) -> McpNativeCard
fn clone(&self) -> McpNativeCard
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for McpNativeCard
impl !UnwindSafe for McpNativeCard
impl Freeze for McpNativeCard
impl Send for McpNativeCard
impl Sync for McpNativeCard
impl Unpin for McpNativeCard
impl UnsafeUnpin for McpNativeCard
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